Sha256: b4ee1e856b19da652619ea4454e8e7783a50730116b1a3aad0ca56f2dea22f34

Contents?: true

Size: 494 Bytes

Versions: 1

Compression:

Stored size: 494 Bytes

Contents

module FbGraph
  class Tag
    include Comparison

    attr_accessor :user, :name, :x, :y, :created_time

    def initialize(attributes = {})
      @x = attributes.delete(:x)
      @y = attributes.delete(:y)
      if (created_time = attributes.delete(:created_time))
        @created_time = Time.parse(created_time).utc
      end
      if (identifier = attributes.delete(:id)).present?
        @user = User.new(identifier, attributes)
      end
      @name = attributes[:name]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fb_graph-1.2.5 lib/fb_graph/tag.rb