Sha256: 9412e31db06766e8a3b726dfa722554da0ff084079f5d05674daf65e5b15c615
Contents?: true
Size: 615 Bytes
Versions: 45
Compression:
Stored size: 615 Bytes
Contents
module FbGraph class TaggedObject < Node attr_accessor :name, :offset, :length, :raw_attributes def initialize(identifier, attributes = {}) super @raw_attributes = attributes [:name, :offset, :length].each do |key| self.send("#{key}=", attributes[key]) end end def fetch_with_class_determination attributes = fetch_without_class_determination.raw_attributes klass = if attributes[:category] Page else User end klass.new attributes[:id], attributes end alias_method_chain :fetch, :class_determination end end
Version data entries
45 entries across 45 versions & 1 rubygems