Class: Kiss::Format::Integer
Class Method Summary
collapse
inherited, lookup
Class Method Details
.parse(value, context = {}) ⇒ Object
43
44
45
|
# File 'lib/kiss/format.rb', line 43
def parse(value, context = {})
value.to_i
end
|
.validate(value, context = {}) ⇒ Object
47
48
49
50
|
# File 'lib/kiss/format.rb', line 47
def validate(value, context = {})
value.blank? ? nil : super(value.gsub(/[\$,]/, ''), context)
end
|
.value_to_s(value, context = {}) ⇒ Object
52
53
54
55
|
# File 'lib/kiss/format.rb', line 52
def value_to_s(value, context = {})
value
end
|