Class: Steep::AST::Annotation::Dynamic::Name
- Inherits:
-
Object
- Object
- Steep::AST::Annotation::Dynamic::Name
- Defined in:
- lib/steep/ast/annotation.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name:, kind:, location: nil) ⇒ Name
constructor
A new instance of Name.
- #instance_method? ⇒ Boolean
- #module_method? ⇒ Boolean
Constructor Details
#initialize(name:, kind:, location: nil) ⇒ Name
Returns a new instance of Name.
90 91 92 93 94 |
# File 'lib/steep/ast/annotation.rb', line 90 def initialize(name:, kind:, location: nil) @name = name @kind = kind @location = location end |
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
86 87 88 |
# File 'lib/steep/ast/annotation.rb', line 86 def kind @kind end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
88 89 90 |
# File 'lib/steep/ast/annotation.rb', line 88 def location @location end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
87 88 89 |
# File 'lib/steep/ast/annotation.rb', line 87 def name @name end |
Instance Method Details
#==(other) ⇒ Object
104 105 106 107 108 |
# File 'lib/steep/ast/annotation.rb', line 104 def ==(other) other.is_a?(Name) && other.name == name && other.kind == kind end |
#instance_method? ⇒ Boolean
96 97 98 |
# File 'lib/steep/ast/annotation.rb', line 96 def instance_method? kind == :instance || kind == :module_instance end |
#module_method? ⇒ Boolean
100 101 102 |
# File 'lib/steep/ast/annotation.rb', line 100 def module_method? kind == :module || kind == :module_instance end |