Class: Norikra::Client::CLIUtil::Parser::JSON
- Inherits:
-
Object
- Object
- Norikra::Client::CLIUtil::Parser::JSON
- Defined in:
- lib/norikra/client/cli/parser.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ JSON
constructor
A new instance of JSON.
- #parse(line) ⇒ Object
Constructor Details
#initialize(*args) ⇒ JSON
Returns a new instance of JSON.
18 19 20 |
# File 'lib/norikra/client/cli/parser.rb', line 18 def initialize(*args) require 'json' end |
Instance Method Details
#parse(line) ⇒ Object
21 22 23 |
# File 'lib/norikra/client/cli/parser.rb', line 21 def parse(line) ::JSON.parse(line.chop) end |