Class: Helioth::Action
- Inherits:
-
Object
- Object
- Helioth::Action
- Defined in:
- lib/helioth/action.rb
Instance Attribute Summary collapse
-
#feature ⇒ Object
Returns the value of attribute feature.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, &block) ⇒ Action
constructor
A new instance of Action.
- #locales(*locales) ⇒ Object
- #status(status = nil) ⇒ Object
Constructor Details
#initialize(name, &block) ⇒ Action
Returns a new instance of Action.
6 7 8 9 10 |
# File 'lib/helioth/action.rb', line 6 def initialize(name, &block) @name = name @locales = I18n.available_locales instance_eval(&block) end |
Instance Attribute Details
#feature ⇒ Object
Returns the value of attribute feature.
4 5 6 |
# File 'lib/helioth/action.rb', line 4 def feature @feature end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/helioth/action.rb', line 4 def name @name end |
Instance Method Details
#locales(*locales) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/helioth/action.rb', line 16 def locales(*locales) unless locales.empty? @locales = locales end @locales end |
#status(status = nil) ⇒ Object
12 13 14 |
# File 'lib/helioth/action.rb', line 12 def status(status=nil) @status ||= status end |