class Pione::Location::BasicLocation

BasicLocation is a class for all location classes.

Attributes

address[R]

Public Class Methods

location_type(name=nil) click to toggle source

Set location type.

@param name [Symbol]

location type name

@return [void]

# File lib/pione/location/basic-location.rb, line 49
def location_type(name=nil)
  if name
    @location_type = name
  else
    @location_type ? @location_type : superclass.location_type
  end
end
new(address) click to toggle source

Create a location with the URI.

@param uri [URI]

location URI
# File lib/pione/location/basic-location.rb, line 65
def initialize(address)
  @address = address
end

Public Instance Methods

==(other) click to toggle source

@api private

# File lib/pione/location/basic-location.rb, line 76
def ==(other)
  return false unless other.kind_of?(self.class)
  @address == other.address
end
hash() click to toggle source

@api private

# File lib/pione/location/basic-location.rb, line 83
def hash
  @address.hash
end
inspect() click to toggle source

@api private

# File lib/pione/location/basic-location.rb, line 70
def inspect
  "#<%s %s>" % [self.class, address]
end
Also aliased as: to_s
to_s()
Alias for: inspect