Class: Fission::Response
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#data ⇒ Object
Returns the value of attribute data.
-
#output ⇒ Object
Returns the value of attribute output.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Response
constructor
A new instance of Response.
- #successful? ⇒ Boolean
Constructor Details
#initialize(args = {}) ⇒ Response
Returns a new instance of Response.
5 6 7 8 9 |
# File 'lib/fission.old/response.rb', line 5 def initialize(args={}) @code = args.fetch :code, 1 @output = args.fetch :output, '' @data = args.fetch :data, nil end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
3 4 5 |
# File 'lib/fission.old/response.rb', line 3 def code @code end |
#data ⇒ Object
Returns the value of attribute data.
3 4 5 |
# File 'lib/fission.old/response.rb', line 3 def data @data end |
#output ⇒ Object
Returns the value of attribute output.
3 4 5 |
# File 'lib/fission.old/response.rb', line 3 def output @output end |
Instance Method Details
#successful? ⇒ Boolean
11 12 13 |
# File 'lib/fission.old/response.rb', line 11 def successful? @code == 0 end |