Class: Calagator::VVenue
- Inherits:
-
Struct
- Object
- Struct
- Calagator::VVenue
show all
- Defined in:
- lib/calagator/vcalendar.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
83
84
85
86
87
88
|
# File 'lib/calagator/vcalendar.rb', line 83
def method_missing(method, *args, &block)
vcard_hash_key = method.to_s.upcase
return vcard_hash[vcard_hash_key] if vcard_hash.key?(vcard_hash_key)
super
end
|
Instance Attribute Details
#raw_ical_venue ⇒ Object
Returns the value of attribute raw_ical_venue
78
79
80
|
# File 'lib/calagator/vcalendar.rb', line 78
def raw_ical_venue
@raw_ical_venue
end
|
Instance Method Details
#latitude ⇒ Object
95
96
97
|
# File 'lib/calagator/vcalendar.rb', line 95
def latitude
geo_latlng.first
end
|
#longitude ⇒ Object
99
100
101
|
# File 'lib/calagator/vcalendar.rb', line 99
def longitude
geo_latlng.last
end
|
#respond_to?(method, include_private = false) ⇒ Boolean
90
91
92
93
|
# File 'lib/calagator/vcalendar.rb', line 90
def respond_to?(method, include_private = false)
vcard_hash_key = method.to_s.upcase
vcard_hash.key?(vcard_hash_key) || super
end
|
#uid ⇒ Object
79
80
81
|
# File 'lib/calagator/vcalendar.rb', line 79
def uid
raw_ical_venue.match(/^UID:(?<uid>.+)$/)[:uid]
end
|