Class: Pippi::Checks::MethodSequenceFinder::Record
- Inherits:
-
Object
- Object
- Pippi::Checks::MethodSequenceFinder::Record
- Defined in:
- lib/pippi/checks/method_sequence_finder.rb
Instance Attribute Summary collapse
-
#lineno ⇒ Object
readonly
Returns the value of attribute lineno.
-
#meth1 ⇒ Object
readonly
Returns the value of attribute meth1.
-
#meth2 ⇒ Object
readonly
Returns the value of attribute meth2.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(path, lineno, meth1, meth2) ⇒ Record
constructor
A new instance of Record.
Constructor Details
#initialize(path, lineno, meth1, meth2) ⇒ Record
Returns a new instance of Record.
37 38 39 40 41 42 |
# File 'lib/pippi/checks/method_sequence_finder.rb', line 37 def initialize(path, lineno, meth1, meth2) @path = path @lineno = lineno @meth1 = meth1 @meth2 = meth2 end |
Instance Attribute Details
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
36 37 38 |
# File 'lib/pippi/checks/method_sequence_finder.rb', line 36 def lineno @lineno end |
#meth1 ⇒ Object (readonly)
Returns the value of attribute meth1.
36 37 38 |
# File 'lib/pippi/checks/method_sequence_finder.rb', line 36 def meth1 @meth1 end |
#meth2 ⇒ Object (readonly)
Returns the value of attribute meth2.
36 37 38 |
# File 'lib/pippi/checks/method_sequence_finder.rb', line 36 def meth2 @meth2 end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
36 37 38 |
# File 'lib/pippi/checks/method_sequence_finder.rb', line 36 def path @path end |
Instance Method Details
#eql?(other) ⇒ Boolean
43 44 45 |
# File 'lib/pippi/checks/method_sequence_finder.rb', line 43 def eql?(other) path == other.path && lineno == other.lineno && meth1 == other.meth1 && meth2 == other.meth2 end |
#hash ⇒ Object
46 47 48 49 |
# File 'lib/pippi/checks/method_sequence_finder.rb', line 46 def hash require 'zlib' Zlib.crc32("#{path}:#{lineno}:#{meth1}:#{meth2}") end |