class StructureDigest::SchemaParts::Path

Attributes

parts[R]

Public Class Methods

new(parts=[]) click to toggle source
# File lib/structure_digest/path.rb, line 4
def initialize(parts=[])
  @parts = parts
end

Public Instance Methods

==(other) click to toggle source
# File lib/structure_digest/path.rb, line 21
def ==(other)
  self.class == other.class && @parts == other.parts
end
Also aliased as: eql?
abstract() click to toggle source
# File lib/structure_digest/path.rb, line 8
def abstract
  AbstractPath.new(@parts.map(&:abstract).compact)
end
add_part(part) click to toggle source
# File lib/structure_digest/path.rb, line 16
def add_part(part)
  Path.new(@parts + [part])
end
eql?(other)
Alias for: ==
hash() click to toggle source
# File lib/structure_digest/path.rb, line 25
def hash; [@parts].hash; end
serialize() click to toggle source
# File lib/structure_digest/path.rb, line 12
def serialize
  @parts.map(&:serialize).join
end