Class: Livecal::Calendar

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/livecal/calendar.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(events) ⇒ Calendar

Returns a new instance of Calendar.



9
10
11
# File 'lib/livecal/calendar.rb', line 9

def initialize(events)
  @events = events
end

Instance Attribute Details

#eventsObject (readonly)

Returns the value of attribute events.



7
8
9
# File 'lib/livecal/calendar.rb', line 7

def events
  @events
end

Instance Method Details

#each(&block) ⇒ Object



13
14
15
# File 'lib/livecal/calendar.rb', line 13

def each(&block)
  events.each(&block)
end