Module: Nandi::Formatting::ClassMethods
- Defined in:
- lib/nandi/formatting.rb
Instance Method Summary collapse
-
#formatted_property(name) ⇒ Object
Define an accessor method that will retrieve a value from a cell’s model and format it with the format_value method below.
Instance Method Details
#formatted_property(name) ⇒ Object
Define an accessor method that will retrieve a value from a cell’s model and format it with the format_value method below.
18 19 20 21 22 |
# File 'lib/nandi/formatting.rb', line 18 def formatted_property(name) define_method(name) do format_value(model.send(name)) end end |