Class: Kokkai::Parser
- Inherits:
-
Object
- Object
- Kokkai::Parser
- Defined in:
- lib/kokkai/parser.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#raw_data ⇒ Object
readonly
Returns the value of attribute raw_data.
Instance Method Summary collapse
-
#initialize(raw_data, raw_status) ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize(raw_data, raw_status) ⇒ Parser
7 8 9 10 11 12 13 14 |
# File 'lib/kokkai/parser.rb', line 7 def initialize(raw_data, raw_status) if raw_status == 200 @data = Data.new(raw_data.dig("data")) else error = error(raw_data, raw_status) raise(error) end end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
5 6 7 |
# File 'lib/kokkai/parser.rb', line 5 def data @data end |
#raw_data ⇒ Object (readonly)
Returns the value of attribute raw_data.
5 6 7 |
# File 'lib/kokkai/parser.rb', line 5 def raw_data @raw_data end |