Class: Almanack::Representation::BuiltIcalEvent
- Inherits:
-
Object
- Object
- Almanack::Representation::BuiltIcalEvent
- Defined in:
- lib/almanack/representation/built_ical_event.rb
Instance Attribute Summary collapse
-
#event ⇒ Object
readonly
Returns the value of attribute event.
Class Method Summary collapse
Instance Method Summary collapse
- #ical_event ⇒ Object
-
#initialize(event) ⇒ BuiltIcalEvent
constructor
A new instance of BuiltIcalEvent.
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
#event ⇒ Object (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_event ⇒ Object
10 11 12 |
# File 'lib/almanack/representation/built_ical_event.rb', line 10 def ical_event @ical_event ||= build! end |