Class: Libgss::Action

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject

Returns the value of attribute id.



8
9
10
# File 'lib/libgss/action.rb', line 8

def id
  @id
end

Instance Method Details

#to_hashObject



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