Class: Bemer::SimpleForm::Configuration

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/bemer/simple_form/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



14
15
16
17
18
# File 'lib/bemer/simple_form/configuration.rb', line 14

def initialize
  @bemify_namespaces                   = %i[error hint input wrapper label]
  @element_name_transformer            = nil
  @input_type_modifiers_for_namespaces = %i[input wrapper label]
end

Instance Attribute Details

#bemify_namespacesObject

Returns the value of attribute bemify_namespaces.



11
12
13
# File 'lib/bemer/simple_form/configuration.rb', line 11

def bemify_namespaces
  @bemify_namespaces
end

#element_name_transformerObject

Returns the value of attribute element_name_transformer.



11
12
13
# File 'lib/bemer/simple_form/configuration.rb', line 11

def element_name_transformer
  @element_name_transformer
end

#input_type_modifiers_for_namespacesObject

Returns the value of attribute input_type_modifiers_for_namespaces.



11
12
13
# File 'lib/bemer/simple_form/configuration.rb', line 11

def input_type_modifiers_for_namespaces
  @input_type_modifiers_for_namespaces
end

Instance Method Details

#bemify_suffix_namespacesObject



20
21
22
# File 'lib/bemer/simple_form/configuration.rb', line 20

def bemify_suffix_namespaces
  @bemify_suffix_namespaces ||= Array.wrap(bemify_namespaces).uniq.map { |n| add_sufix(n) }
end

#input_type_modifiers_for_suffix_namespacesObject



24
25
26
# File 'lib/bemer/simple_form/configuration.rb', line 24

def input_type_modifiers_for_suffix_namespaces
  @input_type_modifiers_for_suffix_namespaces ||= Array.wrap(input_type_modifiers_for_namespaces).uniq.map { |n| add_sufix(n) } # rubocop:disable Metrics/LineLength
end