Module: Obviews::Controller::Exposure
- Included in:
- Obviews::Controller, ClassMethods
- Defined in:
- lib/obviews/controller.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#_exposed_methods ⇒ Object
9 10 11 |
# File 'lib/obviews/controller.rb', line 9 def _exposed_methods @_exposed_methods ||= [] end |
Instance Method Details
#_exposed_values ⇒ Object
13 14 15 |
# File 'lib/obviews/controller.rb', line 13 def _exposed_values @_exposed_values ||= {} end |
#expose(*methods) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/obviews/controller.rb', line 17 def expose *methods if methods.size == 1 and methods.first.is_a? Hash _exposed_values.merge!(methods.first) else self._exposed_methods += methods.flatten end end |