Class: Yoda::Store::Objects::MetaClassObject
- Inherits:
-
NamespaceObject
- Object
- Base
- NamespaceObject
- Yoda::Store::Objects::MetaClassObject
- Defined in:
- lib/yoda/store/objects/meta_class_object.rb
Instance Attribute Summary
Attributes inherited from NamespaceObject
#ancestors, #constant_addresses, #instance_method_addresses, #methods, #mixin_addresses
Attributes inherited from Base
#document, #path, #primary_source, #sources, #tag_list
Class Method Summary collapse
Instance Method Summary collapse
- #address ⇒ String
- #base_class_address ⇒ String
-
#initialize(**kwargs) ⇒ MetaClassObject
constructor
A new instance of MetaClassObject.
- #kind ⇒ Object
- #name ⇒ String
Methods inherited from NamespaceObject
Methods inherited from Base
#==, attr_names, #eql?, #hash, #merge, #to_h
Methods included from Patchable
Methods included from Serializable
#derive, included, #to_h, #to_json
Constructor Details
#initialize(**kwargs) ⇒ MetaClassObject
Returns a new instance of MetaClassObject.
16 17 18 |
# File 'lib/yoda/store/objects/meta_class_object.rb', line 16 def initialize(**kwargs) super(kwargs) end |
Class Method Details
.address_of(path) ⇒ String
7 8 9 |
# File 'lib/yoda/store/objects/meta_class_object.rb', line 7 def self.address_of(path) "#{path}%class" end |
Instance Method Details
#address ⇒ String
30 31 32 |
# File 'lib/yoda/store/objects/meta_class_object.rb', line 30 def address MetaClassObject.address_of(path) end |
#base_class_address ⇒ String
35 36 37 |
# File 'lib/yoda/store/objects/meta_class_object.rb', line 35 def base_class_address path end |
#kind ⇒ Object
25 26 27 |
# File 'lib/yoda/store/objects/meta_class_object.rb', line 25 def kind :meta_class end |
#name ⇒ String
21 22 23 |
# File 'lib/yoda/store/objects/meta_class_object.rb', line 21 def name @name ||= path.match(MODULE_TAIL_PATTERN) { |md| md[1] || md[2] } end |