Class: Utils::JSer::JSHash

Inherits:
Hash
  • Object
show all
Includes:
Utils::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 Utils::JSer

new, #to_str

Constructor Details

#initialize(hash) ⇒ JSHash

Returns a new instance of JSHash.

[View source]

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

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