Class: Cable::SpecialAction
- Inherits:
-
Object
- Object
- Cable::SpecialAction
- Defined in:
- lib/cable/special_action.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#controller ⇒ Object
Returns the value of attribute controller.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, hash = {}) ⇒ SpecialAction
constructor
A new instance of SpecialAction.
- #path ⇒ Object
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
#action ⇒ Object
Returns the value of attribute action.
4 5 6 |
# File 'lib/cable/special_action.rb', line 4 def action @action end |
#controller ⇒ Object
Returns the value of attribute controller.
5 6 7 |
# File 'lib/cable/special_action.rb', line 5 def controller @controller end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/cable/special_action.rb', line 6 def name @name end |
Instance Method Details
#path ⇒ Object
14 15 16 |
# File 'lib/cable/special_action.rb', line 14 def path { :controller => self.controller , :action => self.action } end |