class Errapi::Locations::Dotted

Public Class Methods

new(location = nil) click to toggle source
# File lib/errapi/locations/dotted.rb, line 5
def initialize location = nil
  @location = location.to_s.sub /^\./, '' unless location.nil?
end

Public Instance Methods

===(location) click to toggle source
# File lib/errapi/locations/dotted.rb, line 25
def === location
  @location.to_s == location.to_s
end
location_type() click to toggle source
# File lib/errapi/locations/dotted.rb, line 17
def location_type
  :dotted
end
relative(parts) click to toggle source
# File lib/errapi/locations/dotted.rb, line 9
def relative parts
  if @location.nil?
    self.class.new parts
  else
    self.class.new "#{@location}.#{parts.to_s.sub(/^\./, '')}"
  end
end
serialize() click to toggle source
# File lib/errapi/locations/dotted.rb, line 21
def serialize
  @location.nil? ? nil : @location
end
to_s() click to toggle source
# File lib/errapi/locations/dotted.rb, line 29
def to_s
  @location.to_s
end