class Genderize::Io::Parser::Json

Attributes

hash[R]

Public Class Methods

new(data) click to toggle source
# File lib/genderize/io/parser/json.rb, line 12
def initialize(data)
  @data = data
  @hash = {}
end
parse(data) click to toggle source
# File lib/genderize/io/parser/json.rb, line 17
def self.parse(data)
  instance = new(data)
  instance.parse
  instance.hash
end

Public Instance Methods

parse() click to toggle source
# File lib/genderize/io/parser/json.rb, line 23
def parse
  @hash = JSON.parse(@data)
end