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