Class: Parklife::Route
- Inherits:
-
Object
- Object
- Parklife::Route
- Defined in:
- lib/parklife/route.rb
Instance Attribute Summary collapse
-
#crawl ⇒ Object
readonly
Returns the value of attribute crawl.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(path, crawl:) ⇒ Route
constructor
A new instance of Route.
- #inspect ⇒ Object
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
#crawl ⇒ Object (readonly)
Returns the value of attribute crawl.
5 6 7 |
# File 'lib/parklife/route.rb', line 5 def crawl @crawl end |
#path ⇒ Object (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 |
#hash ⇒ Object
17 18 19 |
# File 'lib/parklife/route.rb', line 17 def hash [self.class, path, crawl].hash end |
#inspect ⇒ Object
21 22 23 |
# File 'lib/parklife/route.rb', line 21 def inspect %(<#{self.class.name} path="#{path}" crawl="#{crawl}">) end |