lib/dry/view/exposures.rb in dry-view-0.3.0 vs lib/dry/view/exposures.rb in dry-view-0.4.0
- old
+ new
@@ -19,11 +19,11 @@
def [](name)
exposures[name]
end
def add(name, proc = nil, **options)
- exposures[name] = Exposure.new(name, proc, **options)
+ exposures[name] = Exposure.new(name, proc, options)
end
def bind(obj)
bound_exposures = exposures.each_with_object({}) { |(name, exposure), memo|
memo[name] = exposure.bind(obj)
@@ -45,10 +45,10 @@
def tsort_each_node(&block)
exposures.each_key(&block)
end
def tsort_each_child(name, &block)
- self[name].dependencies.each(&block) if exposures.key?(name)
+ self[name].dependency_names.each(&block) if exposures.key?(name)
end
end
end
end