lib/json_parser/builder.rb in json_parser-1.2.0 vs lib/json_parser/builder.rb in json_parser-1.3.0

- old
+ new

@@ -2,20 +2,21 @@ attr_reader :attr_names def initialize(attr_names, clazz, options) super(clazz, { - path: nil, - json: :json, + after: false, + cached: false, + case: :lower_camel, + class: nil, + compact: false, + default: nil, + flatten: false, full_path: nil, - cached: false, - class: nil, - compact: false, - flatten: false, - after: false, - case: :lower_camel, - type: :none + json: :json, + path: nil, + type: :none }.merge(options.symbolize_keys)) @attr_names = attr_names init end @@ -46,10 +47,10 @@ def case_type options[:case] end def fetcher_options - options.slice(:compact, :after, :type, :flatten).merge({ + options.slice(:compact, :after, :type, :flatten, :default).merge({ clazz: wrapper_clazz, case_type: case_type }) end