lib/conifer.rb in conifer-1.1.0 vs lib/conifer.rb in conifer-1.2.0

- old
+ new

@@ -8,11 +8,11 @@ base.extend ClassMethods end # rubocop:disable Metrics/ParameterLists module ClassMethods - def conifer(name, prefix: nil, dir: nil, method: ::File.basename(name.to_s, '.yml'), singleton: false, - allowed_classes: []) + def conifer(name, prefix: nil, dir: nil, format: :yml, method: ::File.basename(name.to_s, ".#{format}"), + singleton: false, allowed_classes: []) 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}")