Class: Alchemy::Admin::ProductSelect
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Alchemy::Admin::ProductSelect
- Defined in:
- app/components/alchemy/admin/product_select.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#product ⇒ Object
readonly
Returns the value of attribute product.
-
#query_params ⇒ Object
readonly
Returns the value of attribute query_params.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(api_key, product: nil, url: nil, query_params: nil) ⇒ ProductSelect
constructor
A new instance of ProductSelect.
Constructor Details
#initialize(api_key, product: nil, url: nil, query_params: nil) ⇒ ProductSelect
Returns a new instance of ProductSelect.
8 9 10 11 12 13 |
# File 'app/components/alchemy/admin/product_select.rb', line 8 def initialize(api_key, product: nil, url: nil, query_params: nil) @api_key = api_key @product = product @url = url @query_params = query_params end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
6 7 8 |
# File 'app/components/alchemy/admin/product_select.rb', line 6 def api_key @api_key end |
#product ⇒ Object (readonly)
Returns the value of attribute product.
6 7 8 |
# File 'app/components/alchemy/admin/product_select.rb', line 6 def product @product end |
#query_params ⇒ Object (readonly)
Returns the value of attribute query_params.
6 7 8 |
# File 'app/components/alchemy/admin/product_select.rb', line 6 def query_params @query_params end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
6 7 8 |
# File 'app/components/alchemy/admin/product_select.rb', line 6 def url @url end |
Instance Method Details
#call ⇒ Object
15 16 17 |
# File 'app/components/alchemy/admin/product_select.rb', line 15 def call content_tag("alchemy-product-select", content, attributes) end |