Class: Spree::Filters::OptionsPresenter::FilterableOptionType
- Inherits:
-
Struct
- Object
- Struct
- Spree::Filters::OptionsPresenter::FilterableOptionType
- Defined in:
- app/presenters/spree/filters/options_presenter.rb
Instance Attribute Summary collapse
-
#option_type ⇒ Object
Returns the value of attribute option_type.
-
#option_values ⇒ Object
Returns the value of attribute option_values.
Instance Method Summary collapse
Instance Attribute Details
#option_type ⇒ Object
Returns the value of attribute option_type
4 5 6 |
# File 'app/presenters/spree/filters/options_presenter.rb', line 4 def option_type @option_type end |
#option_values ⇒ Object
Returns the value of attribute option_values
4 5 6 |
# File 'app/presenters/spree/filters/options_presenter.rb', line 4 def option_values @option_values end |
Instance Method Details
#to_h ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'app/presenters/spree/filters/options_presenter.rb', line 7 def to_h { id: option_type.id, name: option_type.name, presentation: option_type.presentation, option_values: option_values.map { |e| option_value_hash(e) } } end |