Class: Typhoid::Parser
- Inherits:
-
Object
- Object
- Typhoid::Parser
- Defined in:
- lib/typhoid/parser.rb
Instance Attribute Summary collapse
-
#json_string ⇒ Object
readonly
Returns the value of attribute json_string.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(json_string) ⇒ Parser
constructor
A new instance of Parser.
- #parse ⇒ Object
Constructor Details
#initialize(json_string) ⇒ Parser
Returns a new instance of Parser.
9 10 11 |
# File 'lib/typhoid/parser.rb', line 9 def initialize(json_string) @json_string = json_string end |
Instance Attribute Details
#json_string ⇒ Object (readonly)
Returns the value of attribute json_string.
3 4 5 |
# File 'lib/typhoid/parser.rb', line 3 def json_string @json_string end |
Class Method Details
.call(json_string) ⇒ Object
5 6 7 |
# File 'lib/typhoid/parser.rb', line 5 def self.call(json_string) new(json_string).parse end |
Instance Method Details
#parse ⇒ Object
13 14 15 |
# File 'lib/typhoid/parser.rb', line 13 def parse parsed_body end |