Class: AttributeNormalizer::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/attribute_normalizer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.


32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/attribute_normalizer.rb', line 32

def initialize

  @normalizers = {
    :blank      => AttributeNormalizer::Normalizers::BlankNormalizer,
    :phone      => AttributeNormalizer::Normalizers::PhoneNormalizer,
    :squish     => AttributeNormalizer::Normalizers::SquishNormalizer,
    :strip      => AttributeNormalizer::Normalizers::StripNormalizer,
    :whitespace => AttributeNormalizer::Normalizers::WhitespaceNormalizer,
    :boolean    => AttributeNormalizer::Normalizers::BooleanNormalizer
  }

  @default_normalizers = [ :strip, :blank ]

end

Instance Attribute Details

#default_attributesObject

Returns the value of attribute default_attributes


26
27
28
# File 'lib/attribute_normalizer.rb', line 26

def default_attributes
  @default_attributes
end

#default_normalizersObject

Returns the value of attribute default_normalizers


26
27
28
# File 'lib/attribute_normalizer.rb', line 26

def default_normalizers
  @default_normalizers
end

#normalizersObject

Returns the value of attribute normalizers


26
27
28
# File 'lib/attribute_normalizer.rb', line 26

def normalizers
  @normalizers
end