Class: Parklife::Route

Inherits:
Object
  • Object
show all
Defined in:
lib/parklife/route.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, crawl:) ⇒ Route

Returns a new instance of Route.



7
8
9
10
# File 'lib/parklife/route.rb', line 7

def initialize(path, crawl:)
  @path = path
  @crawl = crawl
end

Instance Attribute Details

#crawlObject (readonly)

Returns the value of attribute crawl.



5
6
7
# File 'lib/parklife/route.rb', line 5

def crawl
  @crawl
end

#pathObject (readonly)

Returns the value of attribute path.



5
6
7
# File 'lib/parklife/route.rb', line 5

def path
  @path
end

Instance Method Details

#==(other) ⇒ Object Also known as: eql?



12
13
14
# File 'lib/parklife/route.rb', line 12

def ==(other)
  path == other.path && crawl == other.crawl
end

#hashObject



17
18
19
# File 'lib/parklife/route.rb', line 17

def hash
  [self.class, path, crawl].hash
end

#inspectObject



21
22
23
# File 'lib/parklife/route.rb', line 21

def inspect
  %(<#{self.class.name} path="#{path}" crawl="#{crawl}">)
end