Я собирался использовать прохладную часть отражательного кода, но просто простое Convert.ToInt32
работает отлично... Простите мой VB, я - парень C#
Public Function GetEnumInt(Of T)(enumVal As T) As Integer
Return Convert.ToInt32(enumVal)
End Function
describe 'Foo' do
describe 'Sub-Foo' do
it "should Bar" do |example|
puts "#{self.class.description} #{example.description}"
end
end
end
Приведенный выше код выводит "Foo Sub-Foo should Бар ».