Sha256: 4e12ced85fd667c3ff76d77b1149a0fccdbbbb8c32f3f48362132bd978816403

Contents?: true

Size: 959 Bytes

Versions: 22

Compression:

Stored size: 959 Bytes

Contents

=begin
  Copyright (C) 2008 Sam Roberts

  This library is free software; you can redistribute it and/or modify it
  under the same terms as the ruby language itself, see the file COPYING for
  details.
=end

module Vpim
  class Icalendar
    module Property
      module Location
        # Physical location information relevant to the component, or nil if
        # there is no LOCATION property.
        def location
          proptext 'LOCATION'
        end

        # Array of Float, +[ latitude, longitude]+.
        #
        # North of the equator is positive latitude, east of the meridian is
        # positive longitude.
        #
        # See RFC2445 for more info... there are lots of special cases.
        def geo
          prop = @properties.detect { |f| f.name? 'GEO' }
          if prop
            prop = Vpim.decode_list(prop.value_raw, ';') do |item| item.to_f end
          end
          prop
        end

      end
    end
  end
end


Version data entries

22 entries across 22 versions & 10 rubygems

Version Path
fraser-vpim-0.658 lib/vpim/property/location.rb
fraser-vpim-0.659 lib/vpim/property/location.rb
fraser-vpim-rails-0.658 lib/vpim/property/location.rb
fraser-vpim-rails-0.659 lib/vpim/property/location.rb
vpim2-0.0.1 lib/vpim/property/location.rb
vpim-rails-reinteractive-0.7 lib/vpim/property/location.rb
vpim-rails-0.665 lib/vpim/property/location.rb
thoughtafter-vpim-0.7.0.1 lib/vpim/property/location.rb
vpim-rails-0.664 lib/vpim/property/location.rb
vpim-rails-0.663 lib/vpim/property/location.rb
vpim-rails-0.662 lib/vpim/property/location.rb
scashin133-vpim-9.4.0 lib/vpim/property/location.rb
vpim-rails-0.661 lib/vpim/property/location.rb
mumboe-vpim-0.7 lib/vpim/property/location.rb
mumboe-vpim-0.695 lib/vpim/property/location.rb
fairtilizer-vpim-0.695 lib/vpim/property/location.rb
vpim-0.597 lib/vpim/property/location.rb
vpim-0.602 lib/vpim/property/location.rb
vpim-0.695 lib/vpim/property/location.rb
vpim-0.604 lib/vpim/property/location.rb