Class: Fanfeedrb::Fanfeedr::Event
Instance Method Summary
collapse
Methods inherited from Abstract
accessor, date_reader, #id, reader
Constructor Details
#initialize(event, attributes = {}) ⇒ Event
Returns a new instance of Event.
13
14
15
16
|
# File 'lib/fanfeedrb/fanfeedr/event.rb', line 13
def initialize(event, attributes = {})
@event = event
super(attributes)
end
|
Instance Method Details
#happenin ⇒ Object
9
10
11
|
# File 'lib/fanfeedrb/fanfeedr/event.rb', line 9
def happenin
date && Date.new(date.year, date.mon, date.day)
end
|
#inspect ⇒ Object
22
23
24
|
# File 'lib/fanfeedrb/fanfeedr/event.rb', line 22
def inspect
"#<#{self.class.inspect}:#{id.inspect}, event_id: #{id.inspect}, date: #{happenin.inspect} >"
end
|
#to_xml ⇒ Object
18
19
20
|
# File 'lib/fanfeedrb/fanfeedr/event.rb', line 18
def to_xml
Fanfeedrb.hash_to_xml(:task, @attributes)
end
|