lib/build/dependency/provider.rb in build-dependency-1.4.0 vs lib/build/dependency/provider.rb in build-dependency-1.5.0

- old
+ new

@@ -71,15 +71,13 @@ def to_s "resolution #{provider.name.inspect} -> #{dependency.name.inspect}" end end - Depends = Struct.new(:name) do + Depends = Struct.new(:name, :options) do def initialize(name, **options) - super(name) - - @options = options + super(name, options) end def wildcard? self.name.is_a?(String) and self.name.include?('*') end @@ -90,25 +88,23 @@ else self.name == name end end - attr :options - def to_s - if @options.any? - "depends on #{name.inspect} #{@options.inspect}" + if options.any? + "depends on #{name.inspect} #{options.inspect}" else "depends on #{name.inspect}" end end def public? - !!@options[:public] + !!options[:public] end def private? - !!@options[:private] + !!options[:private] end def alias? name.is_a?(Symbol) end