Class: FilterForm::InputOptionsBuilder

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
lib/filter_form/input_options_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attribute_nameObject

Returns the value of attribute attribute_name.



15
16
17
# File 'lib/filter_form/input_options_builder.rb', line 15

def attribute_name
  @attribute_name
end

#custom_predicateObject

Returns the value of attribute custom_predicate.



15
16
17
# File 'lib/filter_form/input_options_builder.rb', line 15

def custom_predicate
  @custom_predicate
end

#custom_typeObject

Returns the value of attribute custom_type.



15
16
17
# File 'lib/filter_form/input_options_builder.rb', line 15

def custom_type
  @custom_type
end

#objectObject

Returns the value of attribute object.



15
16
17
# File 'lib/filter_form/input_options_builder.rb', line 15

def object
  @object
end

Instance Method Details

#build(options) ⇒ Object



17
18
19
# File 'lib/filter_form/input_options_builder.rb', line 17

def build(options)
  input_options_class.new(attribute_name: attribute_name, object: object, predicate: predicate, options: options).simple_form_options
end