Class: MasonClient::Request
- Inherits:
-
Object
- Object
- MasonClient::Request
- Defined in:
- lib/mason_client/request.rb
Instance Attribute Summary collapse
-
#callback ⇒ Object
readonly
Returns the value of attribute callback.
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#ref ⇒ Object
readonly
Returns the value of attribute ref.
-
#repo ⇒ Object
readonly
Returns the value of attribute repo.
Instance Method Summary collapse
-
#initialize(repo, ref, command, callback) ⇒ Request
constructor
A new instance of Request.
- #to_json ⇒ Object
Constructor Details
#initialize(repo, ref, command, callback) ⇒ Request
Returns a new instance of Request.
3 4 5 6 7 8 |
# File 'lib/mason_client/request.rb', line 3 def initialize(repo, ref, command, callback) @repo = repo @ref = ref @command = command @callback = callback end |
Instance Attribute Details
#callback ⇒ Object (readonly)
Returns the value of attribute callback.
10 11 12 |
# File 'lib/mason_client/request.rb', line 10 def callback @callback end |
#command ⇒ Object (readonly)
Returns the value of attribute command.
10 11 12 |
# File 'lib/mason_client/request.rb', line 10 def command @command end |
#ref ⇒ Object (readonly)
Returns the value of attribute ref.
10 11 12 |
# File 'lib/mason_client/request.rb', line 10 def ref @ref end |
#repo ⇒ Object (readonly)
Returns the value of attribute repo.
10 11 12 |
# File 'lib/mason_client/request.rb', line 10 def repo @repo end |
Instance Method Details
#to_json ⇒ Object
12 13 14 15 16 17 |
# File 'lib/mason_client/request.rb', line 12 def to_json { :repo => repo, :ref => ref, :command => command, :callback => callback }.to_json end |