Class: Bcome::Stack::Estate

Inherits:
Base show all
Includes:
BecomeObject
Defined in:
lib/stack/estate.rb

Constant Summary

Constants included from BecomeObject

BecomeObject::CONFIGS_PATH

Constants included from Orchestrator::Registry

Orchestrator::Registry::CONFIGS_PATH

Constants included from ContextFunctions

ContextFunctions::CONFIGS_PATH

Instance Method Summary collapse

Methods included from BecomeObject

#all_items, #context_breadcrumb, #do_load_resources, #has_main_context?, #has_potential_resources?, #identifier, #identifier_for, #is_stack_level_resource?, #list, #local_download_path, #main_context, #main_context=, #mini_list, #previous_workspace_object, #previous_workspace_object=, #resource_for_identifier, #resource_identifiers, #resources, #responds_to_list?

Methods inherited from Base

#available_resources_options_string, #become, const_missing, #construct_node, #describe, #has_sub_nodes?, #highlight?, #interactive, #machines, #menu, #method_missing, #node_level_klass, #recipes, #respond_to_bcome_context_method?, #should_eager_load_children?, #workon

Methods included from Orchestrator::Registry

#config_for_registry, #do_load_recipes, #has_registry_config?, #load_recipe_registry, #recipe_registry, #registry_configs_path

Methods included from CommandHelper

#run_local

Methods included from ContextFunctions

#command_for_context, #context_cmd_config_path, #context_cmd_functions, #context_commands, #execute_command_for_context, #has_context_cmd_functions?, #has_context_functions_config?, #load_context_cmd_functions

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Bcome::Stack::Base

Instance Method Details

#become_identifierObject



22
23
24
# File 'lib/stack/estate.rb', line 22

def become_identifier
  ::START_PROMPT
end

#collection_keyObject



14
15
16
# File 'lib/stack/estate.rb', line 14

def collection_key
  :platforms
end

#collection_klassObject



10
11
12
# File 'lib/stack/estate.rb', line 10

def collection_klass 
  ::PLATFORM_STACK_KLASS
end

#config_pathObject



6
7
8
# File 'lib/stack/estate.rb', line 6

def config_path
  "#{CONFIGS_PATH}/platform.yml"
end

#initObject



34
35
36
37
38
# File 'lib/stack/estate.rb', line 34

def init
  n = ::Bcome::Node::Estate.new({ :platforms => resources.collect(&:node) })
  n.set_parent_reference(n, :estate, :platforms)
  return n
end


44
45
46
# File 'lib/stack/estate.rb', line 44

def menu_items
  super
end

#namespaceObject



26
27
28
# File 'lib/stack/estate.rb', line 26

def namespace
  starting_namespace
end

#nodeObject



40
41
42
# File 'lib/stack/estate.rb', line 40

def node
  @node ||= init
end

#starting_namespaceObject



30
31
32
# File 'lib/stack/estate.rb', line 30

def starting_namespace
  ""  # Used to determine where to store downloaded file - this is the start point directory, relative to the bcome install directory
end

#to_sObject



18
19
20
# File 'lib/stack/estate.rb', line 18

def to_s
  "Estate"
end