Class: TableCloth::Extensions::Actions::Action
- Inherits:
-
Object
- Object
- TableCloth::Extensions::Actions::Action
- Defined in:
- lib/table_cloth/extensions/actions/action.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Action
constructor
A new instance of Action.
- #jury ⇒ Object
- #value(object, view, table) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Action
Returns a new instance of Action.
5 6 7 |
# File 'lib/table_cloth/extensions/actions/action.rb', line 5 def initialize(={}) @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/table_cloth/extensions/actions/action.rb', line 3 def @options end |
Instance Method Details
#jury ⇒ Object
9 10 11 |
# File 'lib/table_cloth/extensions/actions/action.rb', line 9 def jury @jury ||= Jury.new(self) end |
#value(object, view, table) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/table_cloth/extensions/actions/action.rb', line 13 def value(object, view, table) if jury.available?(object, table) view.instance_exec(object, &[:proc]) else "" end end |