Class: JSer::JSHash

Inherits:
Hash
  • Object
show all
Includes:
JSer
Defined in:
lib/ngi/utils/jser.rb

Overview

A JSer class Usage:

JSHash.new({"hello" => "world"}).to_str

Instance Method Summary collapse

Methods included from JSer

#to_str

Constructor Details

#initialize(hash) ⇒ JSHash

Returns a new instance of JSHash.



26
27
28
29
30
31
# File 'lib/ngi/utils/jser.rb', line 26

def initialize(hash)
  super
  hash.each do |key, val|
    self[key] = val
  end
end