Class: Almanack::Representation::BuiltIcalEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/almanack/representation/built_ical_event.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event) ⇒ BuiltIcalEvent

Returns a new instance of BuiltIcalEvent.



6
7
8
# File 'lib/almanack/representation/built_ical_event.rb', line 6

def initialize(event)
  @event = event
end

Instance Attribute Details

#eventObject (readonly)

Returns the value of attribute event.



4
5
6
# File 'lib/almanack/representation/built_ical_event.rb', line 4

def event
  @event
end

Class Method Details

.for(event) ⇒ Object



14
15
16
# File 'lib/almanack/representation/built_ical_event.rb', line 14

def self.for(event)
  new(event).ical_event
end

Instance Method Details

#ical_eventObject



10
11
12
# File 'lib/almanack/representation/built_ical_event.rb', line 10

def ical_event
  @ical_event ||= build!
end