lib/k_manager/area.rb in k_manager-0.0.22 vs lib/k_manager/area.rb in k_manager-0.0.23
- old
+ new
@@ -3,16 +3,18 @@
module KManager
class Area
include KLog::Logging
extend Forwardable
+ attr_reader :manager
# TODO: I have not got a use for area name yet, it may be able to drive default config, but not sure.
attr_reader :name
attr_reader :namespace
attr_reader :config
def initialize(**opts)
+ @manager = opts[:manager]
@name = opts[:name]
raise 'Area name is required' unless @name
@namespace = opts[:namespace] || @name
@@ -21,10 +23,10 @@
def resource_manager
@resource_manager ||= KManager::Resources::ResourceManager.new(self)
end
- def_delegators :resource_manager, :resource_changed
+ def_delegators :resource_manager, :resource_changed, :resources, :find_by_uri
def debug(*sections)
log.kv 'Area' , name
log.kv 'Namespace' , namespace