Module: Yoda::Store::Objects
- Defined in:
- lib/yoda/store/objects.rb,
lib/yoda/store/objects/map.rb,
lib/yoda/store/objects/tag.rb,
lib/yoda/store/objects/base.rb,
lib/yoda/store/objects/patch.rb,
lib/yoda/store/objects/merger.rb,
lib/yoda/store/objects/library.rb,
lib/yoda/store/objects/overload.rb,
lib/yoda/store/objects/patch_set.rb,
lib/yoda/store/objects/patchable.rb,
lib/yoda/store/objects/addressable.rb,
lib/yoda/store/objects/library/gem.rb,
lib/yoda/store/objects/library/std.rb,
lib/yoda/store/objects/class_object.rb,
lib/yoda/store/objects/library/core.rb,
lib/yoda/store/objects/serializable.rb,
lib/yoda/store/objects/value_object.rb,
lib/yoda/store/objects/method_object.rb,
lib/yoda/store/objects/module_object.rb,
lib/yoda/store/objects/libraries_status.rb,
lib/yoda/store/objects/namespace_object.rb,
lib/yoda/store/objects/serializable_set.rb,
lib/yoda/store/objects/meta_class_object.rb,
lib/yoda/store/objects/connected_delegation.rb,
lib/yoda/store/objects/library/with_registry.rb,
lib/yoda/store/objects/library/path_resolvable.rb
Defined Under Namespace
Modules: Addressable, ConnectedDelegation, Library, Patchable, Serializable
Classes: Base, ClassObject, LibrariesStatus, Map, Merger, MetaClassObject, MethodObject, ModuleObject, NamespaceObject, Overload, Patch, PatchSet, SerializableSet, Tag, ValueObject
Constant Summary
collapse
- VALUE_REGEXP =
/\A[0-9a-z]/
- MODULE_TAIL_PATTERN =
/(?:::(\w+)|^(\w+))$/
Class Method Summary
collapse
Class Method Details
.deserialize(hsh) ⇒ Object
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/yoda/store/objects.rb', line 31
def deserialize(hsh)
case hsh[:type].to_sym
when :class
ClassObject.new(hsh)
when :module
ModuleObject.new(hsh)
when :meta_class
MetaClassObject.new(hsh)
when :value
ValueObject.new(hsh)
when :method
MethodObject.new(hsh)
end
end
|
.lexical_scopes_of(path) ⇒ Array<Path>
48
49
50
|
# File 'lib/yoda/store/objects.rb', line 48
def lexical_scopes_of(path)
Model::Path.build(path).parent_paths.map { |name| Model::Path.build(name) } + [Model::Path.new('Object')]
end
|