Class: Norikra::Client::CLIUtil::Parser::JSON

Inherits:
Object
  • Object
show all
Defined in:
lib/norikra/client/cli/parser.rb

Instance Method Summary collapse

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