Class: Workarea::Content::Fields::Range
Instance Attribute Summary
#name, #options
Instance Method Summary
collapse
#default, #initialize, #note, #partial, #required?, #slug, #tooltip, #type
Instance Method Details
#max ⇒ Object
9
10
11
|
# File 'app/models/workarea/content/fields/range.rb', line 9
def max
options[:max].to_f
end
|
#min ⇒ Object
5
6
7
|
# File 'app/models/workarea/content/fields/range.rb', line 5
def min
options[:min].to_f
end
|
#step ⇒ Object
13
14
15
|
# File 'app/models/workarea/content/fields/range.rb', line 13
def step
options[:step].to_f
end
|
#typecast(value) ⇒ Object
17
18
19
|
# File 'app/models/workarea/content/fields/range.rb', line 17
def typecast(value)
value.to_f
end
|