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.
55 56 57 58 |
# File 'lib/steep/ast/annotation.rb', line 55 def initialize(name:, args:) @name = name @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
53 54 55 |
# File 'lib/steep/ast/annotation.rb', line 53 def args @args end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
52 53 54 |
# File 'lib/steep/ast/annotation.rb', line 52 def name @name end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
60 61 62 |
# File 'lib/steep/ast/annotation.rb', line 60 def ==(other) other.is_a?(Module) && other.name == name && other.args == args end |
#hash ⇒ Object
66 67 68 |
# File 'lib/steep/ast/annotation.rb', line 66 def hash self.class.hash ^ name.hash ^ args.hash end |