Sha256: 766a807611177223c407c199c47c809de23a0b6cd1299bc69b0e53c0eba715ec

Contents?: true

Size: 1.07 KB

Versions: 1

Compression:

Stored size: 1.07 KB

Contents

module FbGraph
  class Event < Node
    include Connections::Feed
    include Connections::Noreply
    include Connections::Maybe
    include Connections::Invited
    include Connections::Attending
    include Connections::Declined
    include Connections::Picture

    attr_accessor :owner, :name, :description, :start_time, :end_time, :location, :venue, :privacy, :updated_time

    def initialize(identifier, options = {})
      super
      if (owner = options[:owner])
        @owner = FbGraph::User.new(owner.delete(:id), owner)
      end
      @name         = options[:name]
      @description  = options[:description]
      if options[:start_time]
        @start_time = Time.parse(options[:start_time])
      end
      if options[:end_time]
        @end_time = Time.parse(options[:end_time])
      end
      @location     = options[:location]
      @privacy      = options[:privacy]
      if options[:venue]
        @venue = FbGraph::Venue.new(options[:venue])
      end
      if options[:updated_time]
        @updated_time = Time.parse(options[:updated_time])
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fb_graph-0.0.8 lib/fb_graph/event.rb