Class: Wire::InvocationSignal

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

Instance Method Summary collapse

Constructor Details

#initialize(function, arguments, contexts) ⇒ InvocationSignal

Returns a new instance of InvocationSignal.



33
34
35
36
37
# File 'lib/wire.rb', line 33

def initialize(function, arguments, contexts)
  @function = function
  @arguments = arguments
  @contexts = contexts
end

Instance Method Details

#contextsObject



47
48
49
# File 'lib/wire.rb', line 47

def contexts
  @contexts
end

#contexts=(contexts) ⇒ Object



43
44
45
# File 'lib/wire.rb', line 43

def contexts= (contexts)
  @contexts=contexts
end

#functionObject



39
40
41
# File 'lib/wire.rb', line 39

def function
  @function
end

#to_jsonObject



51
52
53
# File 'lib/wire.rb', line 51

def to_json
  "{'address': #{@function.to_json}, 'body': #{@arguments.to_json}, 'contexts': #{@contexts.to_json}}"
end