Class: RTransmission::Request
- Inherits:
-
Object
- Object
- RTransmission::Request
- Defined in:
- lib/rtransmission/request.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
Returns the value of attribute arguments.
-
#method ⇒ Object
Returns the value of attribute method.
-
#response_block ⇒ Object
Returns the value of attribute response_block.
-
#response_prefix ⇒ Object
Returns the value of attribute response_prefix.
Instance Method Summary collapse
-
#initialize(method, arguments, response_prefix, &response_block) ⇒ Request
constructor
A new instance of Request.
- #to_json ⇒ Object
Constructor Details
#initialize(method, arguments, response_prefix, &response_block) ⇒ Request
Returns a new instance of Request.
14 15 16 17 18 19 |
# File 'lib/rtransmission/request.rb', line 14 def initialize(method, arguments, response_prefix, &response_block) @method = method @arguments = arguments @response_prefix = response_prefix @response_block = response_block end |
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments.
10 11 12 |
# File 'lib/rtransmission/request.rb', line 10 def arguments @arguments end |
#method ⇒ Object
Returns the value of attribute method.
9 10 11 |
# File 'lib/rtransmission/request.rb', line 9 def method @method end |
#response_block ⇒ Object
Returns the value of attribute response_block.
12 13 14 |
# File 'lib/rtransmission/request.rb', line 12 def response_block @response_block end |
#response_prefix ⇒ Object
Returns the value of attribute response_prefix.
11 12 13 |
# File 'lib/rtransmission/request.rb', line 11 def response_prefix @response_prefix end |
Instance Method Details
#to_json ⇒ Object
21 22 23 |
# File 'lib/rtransmission/request.rb', line 21 def to_json {'method' => @method, 'arguments' => @arguments}.to_json end |