Class: Steep::AST::Annotation::Implements::Module
- Inherits:
-
Object
- Object
- Steep::AST::Annotation::Implements::Module
- Defined in:
- lib/steep/ast/annotation.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(name:, args:) ⇒ Module
constructor
A new instance of Module.
Constructor Details
#initialize(name:, args:) ⇒ Module
Returns a new instance of Module.
57 58 59 60 |
# File 'lib/steep/ast/annotation.rb', line 57 def initialize(name:, args:) @name = name @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
55 56 57 |
# File 'lib/steep/ast/annotation.rb', line 55 def args @args end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
54 55 56 |
# File 'lib/steep/ast/annotation.rb', line 54 def name @name end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
62 63 64 |
# File 'lib/steep/ast/annotation.rb', line 62 def ==(other) other.is_a?(Module) && other.name == name && other.args == args end |
#hash ⇒ Object
68 69 70 |
# File 'lib/steep/ast/annotation.rb', line 68 def hash self.class.hash ^ name.hash ^ args.hash end |