Class: Helioth::Action

Inherits:
Object
  • Object
show all
Defined in:
lib/helioth/action.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#featureObject

Returns the value of attribute feature.



4
5
6
# File 'lib/helioth/action.rb', line 4

def feature
  @feature
end

#nameObject

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