Class: Yoda::Store::Objects::ClassObject
- Inherits:
-
NamespaceObject
- Object
- Base
- NamespaceObject
- Yoda::Store::Objects::ClassObject
- Defined in:
- lib/yoda/store/objects/class_object.rb
Defined Under Namespace
Classes: Connected
Instance Attribute Summary collapse
- #superclass_path ⇒ Path? readonly
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
-
#initialize(superclass_path: nil, **kwargs) ⇒ ClassObject
constructor
A new instance of ClassObject.
- #kind ⇒ Object
- #to_h ⇒ Object
Methods inherited from NamespaceObject
Methods inherited from Base
#==, #address, #eql?, #hash, #merge, #meta_class_address, #name, #namespace?, #parent_address, #with_connection
Methods included from Serializable
#==, #derive, #eql?, #hash, included, #to_json
Methods included from Addressable
Constructor Details
#initialize(superclass_path: nil, **kwargs) ⇒ ClassObject
24 25 26 27 28 |
# File 'lib/yoda/store/objects/class_object.rb', line 24 def initialize(superclass_path: nil, **kwargs) super(**kwargs) @superclass_path = Model::Path.new(superclass_path) if superclass_path end |
Instance Attribute Details
#superclass_path ⇒ Path? (readonly)
15 16 17 |
# File 'lib/yoda/store/objects/class_object.rb', line 15 def superclass_path @superclass_path end |
Class Method Details
.attr_names ⇒ Array<Symbol>
18 19 20 |
# File 'lib/yoda/store/objects/class_object.rb', line 18 def self.attr_names super + i(superclass_path) end |
Instance Method Details
#kind ⇒ Object
30 31 32 |
# File 'lib/yoda/store/objects/class_object.rb', line 30 def kind :class end |
#to_h ⇒ Object
34 35 36 |
# File 'lib/yoda/store/objects/class_object.rb', line 34 def to_h super.merge(superclass_path: superclass_path&.to_s) end |