Class: Puffer::Controller::Actions

Inherits:
Array
  • Object
show all
Defined in:
lib/puffer/controller/actions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope) ⇒ Actions

Returns a new instance of Actions.



7
8
9
10
# File 'lib/puffer/controller/actions.rb', line 7

def initialize scope
  @scope = scope.to_s
  super()
end

Instance Attribute Details

#controllerObject

Returns the value of attribute controller.



4
5
6
# File 'lib/puffer/controller/actions.rb', line 4

def controller
  @controller
end

#scopeObject

Returns the value of attribute scope.



5
6
7
# File 'lib/puffer/controller/actions.rb', line 5

def scope
  @scope
end

Instance Method Details

#action_classObject



18
19
20
# File 'lib/puffer/controller/actions.rb', line 18

def action_class
  "Puffer::Controller::#{scope.camelize}Action".constantize
end