Class: Cable::SpecialAction

Inherits:
Object
  • Object
show all
Defined in:
lib/cable/special_action.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, hash = {}) ⇒ SpecialAction

Returns a new instance of SpecialAction.



8
9
10
11
12
# File 'lib/cable/special_action.rb', line 8

def initialize( name , hash = {} )
  self.name = name
  self.controller = hash[:controller] if hash.has_key? :controller
  self.action = hash[:action] if hash.has_key? :action
end

Instance Attribute Details

#actionObject

Returns the value of attribute action.



4
5
6
# File 'lib/cable/special_action.rb', line 4

def action
  @action
end

#controllerObject

Returns the value of attribute controller.



5
6
7
# File 'lib/cable/special_action.rb', line 5

def controller
  @controller
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/cable/special_action.rb', line 6

def name
  @name
end

Instance Method Details

#pathObject



14
15
16
# File 'lib/cable/special_action.rb', line 14

def path
  { :controller => self.controller , :action => self.action }
end