Sha256: c572fc060823d81f898943a82590fd73417364bdebfd5f2f64b031414c52e153

Contents?: true

Size: 621 Bytes

Versions: 4

Compression:

Stored size: 621 Bytes

Contents

module AttributesMapper
  class Configuration
    include ActiveSupport::Configurable

    config_accessor(:required_attributes) { [] }
    config_accessor(:optional_attributes) { [] }
    config_accessor(:scopes) { {} }
    config_accessor(:source_data_wrapper_class) { nil }
    config_accessor(:apply_input_data_transform_proc) { nil }

    def ordered_path_context_names
      required_attributes + optional_attributes
    end

    def source_data_wrapper_class?
      source_data_wrapper_class.present?
    end

    def apply_input_data_transform?
      apply_input_data_transform_proc.is_a?(Proc)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
attributes-mapper-0.1.4 lib/attributes-mapper/configuration.rb
attributes-mapper-0.1.2 lib/attributes-mapper/configuration.rb
attributes-mapper-0.1.1 lib/attributes-mapper/configuration.rb
attributes-mapper-0.1.0 lib/attributes-mapper/configuration.rb