Class: Calagator::VVenue

Inherits:
Struct
  • Object
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



79
80
81
82
83
# File 'lib/calagator/vcalendar.rb', line 79

def method_missing(method, *args, &block)
  vcard_hash_key = method.to_s.upcase
  return vcard_hash[vcard_hash_key] if vcard_hash.has_key?(vcard_hash_key)
  super
end

Instance Attribute Details

#raw_ical_venueObject

Returns the value of attribute raw_ical_venue

Returns:

  • (Object)

    the current value of raw_ical_venue



74
75
76
# File 'lib/calagator/vcalendar.rb', line 74

def raw_ical_venue
  @raw_ical_venue
end

Instance Method Details

#latitudeObject



90
91
92
# File 'lib/calagator/vcalendar.rb', line 90

def latitude
  geo_latlng.first
end

#longitudeObject



94
95
96
# File 'lib/calagator/vcalendar.rb', line 94

def longitude
  geo_latlng.last
end

#respond_to?(method, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


85
86
87
88
# File 'lib/calagator/vcalendar.rb', line 85

def respond_to?(method, include_private = false)
  vcard_hash_key = method.to_s.upcase
  vcard_hash.has_key?(vcard_hash_key) || super
end

#uidObject



75
76
77
# File 'lib/calagator/vcalendar.rb', line 75

def uid
  raw_ical_venue.match(/^UID:(?<uid>.+)$/)[:uid]
end