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.
33
34
35
|
# File 'lib/avm/launcher/instances/base.rb', line 33
def parent
@parent
end
|
Class Method Details
.extend_object(object) ⇒ Object
.instanciate(path, parent) ⇒ Object
Instance Method Details
36
37
38
|
# File 'lib/avm/launcher/instances/base.rb', line 36
def application
@application ||= ::Avm::Registry.applications.detect(project_name)
end
|
#included? ⇒ Boolean
62
63
64
|
# File 'lib/avm/launcher/instances/base.rb', line 62
def included?
::Avm::Launcher::Context.current.settings.excluded_projects.exclude?(project_name)
end
|
#name ⇒ Object
40
41
42
|
# File 'lib/avm/launcher/instances/base.rb', line 40
def name
logical
end
|
#project? ⇒ Boolean
54
55
56
|
# File 'lib/avm/launcher/instances/base.rb', line 54
def project?
stereotypes.any?
end
|
#project_name ⇒ Object
58
59
60
|
# File 'lib/avm/launcher/instances/base.rb', line 58
def project_name
::File.basename(logical)
end
|
#stereotype?(stereotype) ⇒ Boolean
44
45
46
|
# File 'lib/avm/launcher/instances/base.rb', line 44
def stereotype?(stereotype)
stereotypes.include?(stereotype)
end
|
#to_h ⇒ Object
66
67
68
|
# File 'lib/avm/launcher/instances/base.rb', line 66
def to_h
super.to_h.merge(parent: parent&.logical)
end
|
#to_parent_path ⇒ Object
48
49
50
51
52
|
# File 'lib/avm/launcher/instances/base.rb', line 48
def to_parent_path
return self unless @parent
logical.gsub(/\A#{Regexp.quote(@parent.logical)}/, '')
end
|