Class: SeametrixRuby::Responses::PortResult
- Inherits:
-
Object
- Object
- SeametrixRuby::Responses::PortResult
- Defined in:
- lib/seametrix_ruby/responses/port_result.rb
Instance Attribute Summary collapse
-
#ports ⇒ Object
Returns the value of attribute ports.
-
#result_code ⇒ Object
Returns the value of attribute result_code.
-
#result_text ⇒ Object
Returns the value of attribute result_text.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ PortResult
constructor
A new instance of PortResult.
Constructor Details
#initialize(attributes = {}) ⇒ PortResult
Returns a new instance of PortResult.
12 13 14 15 16 |
# File 'lib/seametrix_ruby/responses/port_result.rb', line 12 def initialize(attributes = {}) @result_code = attributes[:result_code] @result_text = attributes[:result_text] self.ports = attributes[:ports] end |
Instance Attribute Details
#ports ⇒ Object
Returns the value of attribute ports.
10 11 12 |
# File 'lib/seametrix_ruby/responses/port_result.rb', line 10 def ports @ports end |
#result_code ⇒ Object
Returns the value of attribute result_code.
8 9 10 |
# File 'lib/seametrix_ruby/responses/port_result.rb', line 8 def result_code @result_code end |
#result_text ⇒ Object
Returns the value of attribute result_text.
8 9 10 |
# File 'lib/seametrix_ruby/responses/port_result.rb', line 8 def result_text @result_text end |
Class Method Details
.from_json(json_string) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/seametrix_ruby/responses/port_result.rb', line 18 def self.from_json(json_string) json = MultiJson.load(json_string) new(result_code: json['resultCode'], result_text: json['resultText'], ports: json['ports']) end |