Class: SuperTable::Record
- Inherits:
-
Struct
- Object
- Struct
- SuperTable::Record
- Extended by:
- Forwardable
- Includes:
- ViewHelpers
- Defined in:
- lib/super_table/record.rb
Instance Attribute Summary collapse
-
#model ⇒ Object
Returns the value of attribute model.
Class Method Summary collapse
Instance Method Summary collapse
Methods included from ViewHelpers
#del, #div, included, #small, #span, #strong, #td, #th, #tr
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object (private)
27 28 29 |
# File 'lib/super_table/record.rb', line 27 def method_missing(method, *args, &block) model.send(method, *args, &block) end |
Instance Attribute Details
#model ⇒ Object
Returns the value of attribute model
4 5 6 |
# File 'lib/super_table/record.rb', line 4 def model @model end |
Class Method Details
.property(attr_name) ⇒ Object
10 11 12 |
# File 'lib/super_table/record.rb', line 10 def property(attr_name) def_delegator :model, attr_name end |
Instance Method Details
#helpers ⇒ Object
15 16 17 18 19 |
# File 'lib/super_table/record.rb', line 15 def helpers @helpers ||= Class.new do include ViewHelpers end.new end |