Module: Lotus::Action::Exposable::ClassMethods
- Defined in:
- lib/lotus/action/exposable.rb
Overview
Instance Method Summary collapse
-
#expose(*names) ⇒ void
Expose the given attributes on the outside of the object with a getter and a special method called #exposures.
-
#exposures ⇒ Array
private
Set of exposures attribute names.
Instance Method Details
#expose(*names) ⇒ void
This method returns an undefined value.
Expose the given attributes on the outside of the object with a getter and a special method called #exposures.
47 48 49 50 51 52 |
# File 'lib/lotus/action/exposable.rb', line 47 def expose(*names) class_eval do attr_reader *names exposures.push *names end end |
#exposures ⇒ Array
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Set of exposures attribute names
60 61 62 |
# File 'lib/lotus/action/exposable.rb', line 60 def exposures @exposures ||= [] end |