Class: Spoom::Model::Symbol
- Inherits:
-
Object
- Object
- Spoom::Model::Symbol
- Extended by:
- T::Sig
- Defined in:
- lib/spoom/model/model.rb
Overview
A Symbol is a uniquely named entity in the Ruby codebase
A symbol can have multiple definitions, e.g. a class can be reopened. Sometimes a symbol can have multiple definitions of different types, e.g. ‘foo` method can be defined both as a method and as an attribute accessor.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#definitions ⇒ Object
readonly
Returns the value of attribute definitions.
-
#full_name ⇒ Object
readonly
Returns the value of attribute full_name.
Instance Method Summary collapse
-
#initialize(full_name) ⇒ Symbol
constructor
A new instance of Symbol.
- #name ⇒ Object
- #to_s ⇒ Object
Constructor Details
Instance Attribute Details
#definitions ⇒ Object (readonly)
Returns the value of attribute definitions.
24 25 26 |
# File 'lib/spoom/model/model.rb', line 24 def definitions @definitions end |
#full_name ⇒ Object (readonly)
Returns the value of attribute full_name.
20 21 22 |
# File 'lib/spoom/model/model.rb', line 20 def full_name @full_name end |
Instance Method Details
#name ⇒ Object
34 35 36 |
# File 'lib/spoom/model/model.rb', line 34 def name T.must(@full_name.split("::").last) end |
#to_s ⇒ Object
39 40 41 |
# File 'lib/spoom/model/model.rb', line 39 def to_s @full_name end |