Module: Lotus::Action::Exposable
- Defined in:
- lib/lotus/action/exposable.rb
Overview
Exposures API
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.included(base) ⇒ Object
private
Override Ruby’s hook for modules.
Instance Method Summary collapse
-
#exposures ⇒ Hash
Set of exposures.
-
#finish ⇒ Object
private
Finalize the response.
Class Method Details
.included(base) ⇒ Object
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.
Override Ruby’s hook for modules. It includes exposures logic
18 19 20 |
# File 'lib/lotus/action/exposable.rb', line 18 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#exposures ⇒ Hash
Set of exposures
95 96 97 98 99 100 101 |
# File 'lib/lotus/action/exposable.rb', line 95 def exposures @exposures ||= {}.tap do |result| self.class.exposures.each do |name| result[name] = send(name) end end end |
#finish ⇒ Object
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.
Finalize the response
109 110 111 112 |
# File 'lib/lotus/action/exposable.rb', line 109 def finish super exposures end |