class Embedly::EmbedlyObject

Public Class Methods

new(obj) click to toggle source

Resursively make ostruct

Calls superclass method
# File lib/embedly/model.rb, line 6
def initialize obj
  o = obj.clone
  o.each do |k,v|
    if v.is_a?Hash
      o[k] = Embedly::EmbedlyObject.new v
    end
  end
  super o
end

Public Instance Methods

marshal_dump() click to toggle source
# File lib/embedly/model.rb, line 22
def marshal_dump
  o = @table.clone
  o.each do |k,v|
    if v.is_a?Embedly::EmbedlyObject
      o[k] = v.marshal_dump
    end
  end
  return o
end
type() click to toggle source

for ruby 1.8.x, type should return @table, not the class.

# File lib/embedly/model.rb, line 18
def type
  method_missing :type
end