Class: Utils::JSer::JSHash
- Inherits:
-
Hash
- Object
- Hash
- Utils::JSer::JSHash
- 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
-
#initialize(hash) ⇒ JSHash
constructor
A new instance of JSHash.
Methods included from Utils::JSer
Constructor Details
permalink #initialize(hash) ⇒ JSHash
Returns a new instance of JSHash.
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 |