Class: Setsumei::Describable::FloatAttribute

Inherits:
Object
  • Object
show all
Defined in:
lib/setsumei/describable/float_attribute.rb

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object



5
6
7
# File 'lib/setsumei/describable/float_attribute.rb', line 5

def == other
  :float == other || FloatAttribute == other
end

#cast(value) ⇒ Object



9
10
11
# File 'lib/setsumei/describable/float_attribute.rb', line 9

def cast value
  value.to_f
end