class DTK::Client::Operation::ClientModuleDir::ServiceInstance::Internal::ModuleInfo
Attributes
module_info_hash[R]
Public Class Methods
new(module_info_hash)
click to toggle source
# File lib/client/operation/client_module_dir/service_instance/internal/module_info.rb, line 22 def initialize(module_info_hash) @module_info_hash = module_info_hash end
Public Instance Methods
branch()
click to toggle source
# File lib/client/operation/client_module_dir/service_instance/internal/module_info.rb, line 30 def branch index(:branch, :name) end
module_name()
click to toggle source
# File lib/client/operation/client_module_dir/service_instance/internal/module_info.rb, line 34 def module_name index(:module, :name) end
repo_url()
click to toggle source
# File lib/client/operation/client_module_dir/service_instance/internal/module_info.rb, line 26 def repo_url index(:repo, :url) end
Private Instance Methods
index(index1, index2)
click to toggle source
# File lib/client/operation/client_module_dir/service_instance/internal/module_info.rb, line 44 def index(index1, index2) index?(index1, index2) || raise_error_missing_key(index1, index2) end
index?(index1, index2)
click to toggle source
# File lib/client/operation/client_module_dir/service_instance/internal/module_info.rb, line 48 def index?(index1, index2) (self.module_info_hash[index1.to_s] || {})[index2.to_s] end
raise_error_missing_key(index1, index2)
click to toggle source
# File lib/client/operation/client_module_dir/service_instance/internal/module_info.rb, line 52 def raise_error_missing_key(index1, index2) if module_name = index?(:module, :name) if module_namespace = index?(:module, :namespace) module_name = "#{module_name}:#{module_namespace}" end end module_name ||= 'module' raise Error, "Unexpected that #{module_name}[#{index1}][#{index2}] is nil" end