Class: Libgss::Action
- Inherits:
-
Object
- Object
- Libgss::Action
- Defined in:
- lib/libgss/action.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize(id, args) ⇒ Action
constructor
A new instance of Action.
- #to_hash ⇒ Object
- #with(new_id) ⇒ Object
Constructor Details
#initialize(id, args) ⇒ Action
Returns a new instance of Action.
10 11 12 13 |
# File 'lib/libgss/action.rb', line 10 def initialize(id, args) @id = id @args = args end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'lib/libgss/action.rb', line 8 def id @id end |
Instance Method Details
#to_hash ⇒ Object
20 21 22 |
# File 'lib/libgss/action.rb', line 20 def to_hash {"id" => id}.update(@args) end |
#with(new_id) ⇒ Object
15 16 17 18 |
# File 'lib/libgss/action.rb', line 15 def with(new_id) @id = new_id self end |