Class: Avm::EacWebappBase0::Instance

Inherits:
Instances::Base show all
Includes:
Postgresql::InstanceWith
Defined in:
lib/avm/eac_webapp_base0/instance.rb,
lib/avm/eac_webapp_base0/instance/subcommand_parent.rb

Defined Under Namespace

Classes: SubcommandParent

Constant Summary collapse

FILES_UNITS =
[].freeze

Constants inherited from Instances::Base

Instances::Base::ID_PATTERN

Instance Method Summary collapse

Methods included from Postgresql::InstanceWith

#pg

Methods inherited from Instances::Base

by_id, #host_env_uncached, #id, #to_s

Methods included from Instances::Entries

#entry, #full_entry_path, #inherited_entry_value, #other_entry_value, #path_prefix, #read_entry, #read_entry_optional

Instance Method Details

#data_dump(argv = []) ⇒ Object



21
22
23
# File 'lib/avm/eac_webapp_base0/instance.rb', line 21

def data_dump(argv = [])
  run_subcommand(::Avm::Tools::Runner::EacWordpressBase0::Data::Dump, argv)
end

#data_dump_runner_classObject



25
26
27
# File 'lib/avm/eac_webapp_base0/instance.rb', line 25

def data_dump_runner_class
  "::Avm::Tools::Runner::#{stereotype_name}::Data::Dump".constantize
end

#data_packageObject



36
37
38
39
40
# File 'lib/avm/eac_webapp_base0/instance.rb', line 36

def data_package
  @data_package ||= ::Avm::Data::Instance::Package.new(
    self, units: { database: database_unit }.merge(files_units)
  )
end

#database_unitObject



42
43
44
# File 'lib/avm/eac_webapp_base0/instance.rb', line 42

def database_unit
  pg.data_unit
end

#run_subcommand(subcommand_class, argv) ⇒ Object



29
30
31
32
33
34
# File 'lib/avm/eac_webapp_base0/instance.rb', line 29

def run_subcommand(subcommand_class, argv)
  subcommand_class.create(
    argv: argv,
    parent: ::Avm::EacWebappBase0::Instance::SubcommandParent.new(self)
  ).run
end

#stereotype_nameObject



17
18
19
# File 'lib/avm/eac_webapp_base0/instance.rb', line 17

def stereotype_name
  self.class.name.desconstantize.demodulize
end