lib/conifer.rb in conifer-1.3.0 vs lib/conifer.rb in conifer-2.0.0
- old
+ new
@@ -9,18 +9,18 @@
end
# rubocop:disable Metrics/ParameterLists
module ClassMethods
def conifer(name, prefix: nil, dir: nil, format: :yml, method: ::File.basename(name.to_s, ".#{format}"),
- singleton: false, allowed_classes: [])
+ singleton: false, **options)
dir ||= ::File.expand_path(::File.dirname(caller_locations.first.path))
body = proc do
return instance_variable_get("@conifer_#{method}") if instance_variable_defined?("@conifer_#{method}")
instance_variable_set "@conifer_#{method}",
Conifer::File.new(name, prefix: prefix, format: format,
- dir: dir, allowed_classes: allowed_classes).tap(&:validate!)
+ dir: dir, **options).tap(&:validate!)
end
singleton ? define_singleton_method(method, &body) : define_method(method, &body)
end
# rubocop:enable Metrics/ParameterLists