Class: Brazenhead::CallAccumulator

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

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



5
6
7
# File 'lib/brazenhead/call_accumulator.rb', line 5

def method_missing(method, *args)
  calls << request.call(method.to_s.to_java_call, args)
end

Instance Method Details

#clearObject



13
14
15
# File 'lib/brazenhead/call_accumulator.rb', line 13

def clear
  @calls = []
end

#messageObject



9
10
11
# File 'lib/brazenhead/call_accumulator.rb', line 9

def message
  "commands=#{calls.to_json}"
end