lib/eac_launcher/instances/base.rb in eac_launcher-0.3.2 vs lib/eac_launcher/instances/base.rb in eac_launcher-0.4.0

- old
+ new

@@ -9,22 +9,21 @@ object.extend ::EacRubyUtils::Console::Speaker object.extend ::EacLauncher::Instances::Base::Cache super end - def instanciate(path, context, parent) + def instanciate(path, parent) unless path.is_a?(::EacLauncher::Instances::Base) raise "#{path} is not a project" unless path.project? path.extend(::EacLauncher::Instances::Base) - path.context = context path.parent = parent end path end end - attr_accessor :context, :parent + attr_accessor :parent def name logical end @@ -61,9 +60,13 @@ ::File.basename(logical) end def included? !::EacLauncher::Context.current.settings.excluded_projects.include?(project_name) + end + + def to_h + super.to_h.merge(parent: parent ? parent.logical : nil) end private def publish?(stereotype)