Class: Rock::SearchItem
- Inherits:
-
Object
- Object
- Rock::SearchItem
- Defined in:
- lib/rock/rock_inspect.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#project_name ⇒ Object
Returns the value of attribute project_name.
Instance Method Summary collapse
- #==(obj) ⇒ Object
- #eql?(obj) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(*info) ⇒ SearchItem
constructor
A new instance of SearchItem.
Constructor Details
#initialize(*info) ⇒ SearchItem
Returns a new instance of SearchItem
9 10 11 12 13 14 15 16 17 |
# File 'lib/rock/rock_inspect.rb', line 9 def initialize(*info) if info.size != 1 raise 'Wrong number of arguments' end info = info[0] @object = info[:object] @project_name = info[:project_name] @name = info[:name] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name
8 9 10 |
# File 'lib/rock/rock_inspect.rb', line 8 def name @name end |
#object ⇒ Object (readonly)
Returns the value of attribute object
6 7 8 |
# File 'lib/rock/rock_inspect.rb', line 6 def object @object end |
#project_name ⇒ Object
Returns the value of attribute project_name
7 8 9 |
# File 'lib/rock/rock_inspect.rb', line 7 def project_name @project_name end |
Instance Method Details
#==(obj) ⇒ Object
28 29 30 |
# File 'lib/rock/rock_inspect.rb', line 28 def ==(obj) name == obj.name end |
#eql?(obj) ⇒ Boolean
19 20 21 22 |
# File 'lib/rock/rock_inspect.rb', line 19 def eql?(obj) self == obj name == obj.name end |
#hash ⇒ Object
24 25 26 |
# File 'lib/rock/rock_inspect.rb', line 24 def hash name.hash end |