Class: AdLint::MessageId
- Inherits:
-
Object
- Object
- AdLint::MessageId
- Defined in:
- lib/adlint/message.rb
Instance Attribute Summary collapse
-
#message_name ⇒ Object
readonly
Returns the value of attribute message_name.
-
#package_name ⇒ Object
readonly
Returns the value of attribute package_name.
Instance Method Summary collapse
- #==(rhs) ⇒ Object
- #eql?(rhs) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(pkg_name, msg_name) ⇒ MessageId
constructor
A new instance of MessageId.
- #qualified? ⇒ Boolean
Constructor Details
#initialize(pkg_name, msg_name) ⇒ MessageId
Returns a new instance of MessageId.
38 39 40 41 |
# File 'lib/adlint/message.rb', line 38 def initialize(pkg_name, msg_name) @package_name = pkg_name = msg_name end |
Instance Attribute Details
#message_name ⇒ Object (readonly)
Returns the value of attribute message_name.
44 45 46 |
# File 'lib/adlint/message.rb', line 44 def end |
#package_name ⇒ Object (readonly)
Returns the value of attribute package_name.
43 44 45 |
# File 'lib/adlint/message.rb', line 43 def package_name @package_name end |
Instance Method Details
#==(rhs) ⇒ Object
50 51 52 |
# File 'lib/adlint/message.rb', line 50 def ==(rhs) self.eql?(rhs) end |
#eql?(rhs) ⇒ Boolean
54 55 56 57 58 59 60 |
# File 'lib/adlint/message.rb', line 54 def eql?(rhs) if self.qualified? && rhs.qualified? @package_name == rhs.package_name && == rhs. else == rhs. end end |
#hash ⇒ Object
62 63 64 |
# File 'lib/adlint/message.rb', line 62 def hash .hash end |
#qualified? ⇒ Boolean
46 47 48 |
# File 'lib/adlint/message.rb', line 46 def qualified? !@package_name.nil? end |