Class: Alchemy::Admin::TaxonSelect

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/alchemy/admin/taxon_select.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_keyObject (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

#placeholderObject (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_paramsObject (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

#taxonObject (readonly)

Returns the value of attribute taxon.



6
7
8
# File 'app/components/alchemy/admin/taxon_select.rb', line 6

def taxon
  @taxon
end

#urlObject (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

#callObject



16
17
18
# File 'app/components/alchemy/admin/taxon_select.rb', line 16

def call
  ("alchemy-taxon-select", content, attributes)
end