Top Level Namespace

Defined Under Namespace

Modules: Jsof

Instance Method Summary collapse

Instance Method Details

#Jsof(obj = {}) ⇒ Jsof::WrapObject, Jsof::WrapArray

Wrap JSON like object



5
6
7
8
9
10
11
12
13
# File 'lib/jsof/global.rb', line 5

def Jsof(obj = {})
  if obj.is_a? Hash
    return Jsof::WrapObject.new(obj)
  end
  if obj.is_a? Array
    return Jsof::WrapArray.new(obj)
  end
  obj
end