Class: Spoom::Model::Reference
- Inherits:
-
Object
- Object
- Spoom::Model::Reference
- Defined in:
- lib/spoom/model/reference.rb
Overview
A reference to something that looks like a constant or a method
Constants could be classes, modules, or actual constants. Methods could be accessors, instance or class methods, aliases, etc.
Defined Under Namespace
Classes: Kind
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
: Kind.
-
#location ⇒ Object
readonly
: Spoom::Location.
-
#name ⇒ Object
readonly
: String.
Class Method Summary collapse
-
.constant(name, location) ⇒ Object
: (String name, Spoom::Location location) -> Reference.
-
.method(name, location) ⇒ Object
: (String name, Spoom::Location location) -> Reference.
Instance Method Summary collapse
-
#constant? ⇒ Boolean
: -> bool.
-
#initialize(kind:, name:, location:) ⇒ Reference
constructor
: (kind: Kind, name: String, location: Spoom::Location) -> void.
-
#method? ⇒ Boolean
: -> bool.
Constructor Details
#initialize(kind:, name:, location:) ⇒ Reference
: (kind: Kind, name: String, location: Spoom::Location) -> void
48 49 50 51 52 |
# File 'lib/spoom/model/reference.rb', line 48 def initialize(kind:, name:, location:) @kind = kind @name = name @location = location end |
Instance Attribute Details
#kind ⇒ Object (readonly)
: Kind
39 40 41 |
# File 'lib/spoom/model/reference.rb', line 39 def kind @kind end |
#location ⇒ Object (readonly)
: Spoom::Location
45 46 47 |
# File 'lib/spoom/model/reference.rb', line 45 def location @location end |
#name ⇒ Object (readonly)
: String
42 43 44 |
# File 'lib/spoom/model/reference.rb', line 42 def name @name end |