Class: Structural::Model::TypeCasts::Float

Inherits:
Cast
  • Object
show all
Defined in:
lib/structural/model/type_casts.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Cast

#cast, #initialize, #type

Constructor Details

This class inherits a constructor from Structural::Model::TypeCasts::Cast

Class Method Details

.typeObject



65
66
67
# File 'lib/structural/model/type_casts.rb', line 65

def self.type
  ::Float
end

Instance Method Details

#conversionObject



69
70
71
# File 'lib/structural/model/type_casts.rb', line 69

def conversion
  value.to_f
end