Class: SuperTable::Record

Inherits:
Struct
  • Object
show all
Extended by:
Forwardable
Includes:
ViewHelpers
Defined in:
lib/super_table/record.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ViewHelpers

#div, included, #small, #span, #strong, #td, #th, #tr

Instance Attribute Details

#modelObject

Returns the value of attribute model

Returns:

  • (Object)

    the current value of model



4
5
6
# File 'lib/super_table/record.rb', line 4

def model
  @model
end

Class Method Details

.property(attr_name) ⇒ Object



12
13
14
# File 'lib/super_table/record.rb', line 12

def property(attr_name)
  def_delegator :model, attr_name
end

Instance Method Details

#helpersObject



17
18
19
20
21
# File 'lib/super_table/record.rb', line 17

def helpers
  @helpers ||= Class.new do
    include ViewHelpers
  end.new
end