class Rubyfocus::Location

A location file. Really a collection of properties and initializer.

Attributes

latitude[RW]
longitude[RW]
name[RW]
notification_flags[RW]
radius[RW]

Public Class Methods

new(n) click to toggle source
# File lib/rubyfocus/location.rb, line 5
def initialize(n)
        @notification_flags = 0
        self.name = n["name"]
        self.latitude = n["latitude"].to_f
        self.longitude = n["longitude"].to_f
        self.radius = n["radius"].to_i
        self.notification_flags = n["notificationFlags"].to_i
end

Public Instance Methods

inspect() click to toggle source
# File lib/rubyfocus/location.rb, line 14
def inspect
        %|#<Rubyfocus::Location latitude="#{self.latitude}" longitude="#{self.longitude}">|
end