lib/core/core.rb in nucleon-0.1.10 vs lib/core/core.rb in nucleon-0.1.11
- old
+ new
@@ -12,19 +12,27 @@
@@ui_lock = Mutex.new
#-----------------------------------------------------------------------------
# Constructor / Destructor
- def initialize(data = {}, defaults = {}, force = true)
+ def initialize(data = {}, defaults = {}, force = true, set_initialized = true)
super(data, defaults, force)
@class_color = Util::Data.ensure_value(delete(:class_color, :cyan), :cyan)
@class_label = self.class.to_s.downcase.gsub(/^nucleon::/, '')
self.logger = delete(:logger, @class_label)
self.ui = Config.new(export).defaults({ :resource => Util::Console.colorize(@class_label, @class_color) })
logger.debug('Initialized instance logger and interface')
+ @initialized = true if set_initialized
+ end
+
+ #-----------------------------------------------------------------------------
+ # Checks
+
+ def initialized?
+ @initialized
end
#-----------------------------------------------------------------------------
# Accessor / Modifiers
\ No newline at end of file