Module: Avm::Launcher::Instances::Base
- Defined in:
- lib/avm/launcher/instances/base.rb,
lib/avm/launcher/instances/base/cache.rb,
lib/avm/launcher/instances/base/publishing.rb
Defined Under Namespace
Modules: Cache, Publishing
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Instance Attribute Details
#parent ⇒ Object
Returns the value of attribute parent.
27
28
29
|
# File 'lib/avm/launcher/instances/base.rb', line 27
def parent
@parent
end
|
Class Method Details
.extend_object(object) ⇒ Object
.instanciate(path, parent) ⇒ Object
Instance Method Details
30
31
32
|
# File 'lib/avm/launcher/instances/base.rb', line 30
def application
@application ||= ::Avm::Registry.applications.detect(project_name)
end
|
#included? ⇒ Boolean
56
57
58
|
# File 'lib/avm/launcher/instances/base.rb', line 56
def included?
::Avm::Launcher::Context.current.settings.excluded_projects.exclude?(project_name)
end
|
#name ⇒ Object
34
35
36
|
# File 'lib/avm/launcher/instances/base.rb', line 34
def name
logical
end
|
#project? ⇒ Boolean
48
49
50
|
# File 'lib/avm/launcher/instances/base.rb', line 48
def project?
stereotypes.any?
end
|
#project_name ⇒ Object
52
53
54
|
# File 'lib/avm/launcher/instances/base.rb', line 52
def project_name
::File.basename(logical)
end
|
#stereotype?(stereotype) ⇒ Boolean
38
39
40
|
# File 'lib/avm/launcher/instances/base.rb', line 38
def stereotype?(stereotype)
stereotypes.include?(stereotype)
end
|
#to_h ⇒ Object
60
61
62
|
# File 'lib/avm/launcher/instances/base.rb', line 60
def to_h
super.to_h.merge(parent: parent&.logical)
end
|
#to_parent_path ⇒ Object
42
43
44
45
46
|
# File 'lib/avm/launcher/instances/base.rb', line 42
def to_parent_path
return self unless @parent
logical.gsub(/\A#{Regexp.quote(@parent.logical)}/, '')
end
|