Class: Spoom::Model::Reference
- Inherits:
-
T::Struct
- Object
- T::Struct
- 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
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.
-
#method? ⇒ Boolean
: -> bool.
Class Method Details
.constant(name, location) ⇒ Object
: (String name, Spoom::Location location) -> Reference
20 21 22 |
# File 'lib/spoom/model/reference.rb', line 20 def constant(name, location) new(name: name, kind: Kind::Constant, location: location) end |
.method(name, location) ⇒ Object
: (String name, Spoom::Location location) -> Reference
25 26 27 |
# File 'lib/spoom/model/reference.rb', line 25 def method(name, location) new(name: name, kind: Kind::Method, location: location) end |