Class: Solrengine::Ui::TokenRowComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Solrengine::Ui::TokenRowComponent
- Defined in:
- app/components/solrengine/ui/token_row_component.rb
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
- #balance ⇒ Object
- #icon_uri ⇒ Object
-
#initialize(token:) ⇒ TokenRowComponent
constructor
token: { symbol:, name:, balance:, icon_uri:, usd_value: }.
- #name ⇒ Object
- #symbol ⇒ Object
- #usd_value ⇒ Object
Constructor Details
#initialize(token:) ⇒ TokenRowComponent
token: { symbol:, name:, balance:, icon_uri:, usd_value: }
9 10 11 |
# File 'app/components/solrengine/ui/token_row_component.rb', line 9 def initialize(token:) @token = token end |
Instance Attribute Details
#token ⇒ Object (readonly)
Returns the value of attribute token.
6 7 8 |
# File 'app/components/solrengine/ui/token_row_component.rb', line 6 def token @token end |
Instance Method Details
#balance ⇒ Object
21 22 23 |
# File 'app/components/solrengine/ui/token_row_component.rb', line 21 def balance token[:balance] end |
#icon_uri ⇒ Object
25 26 27 |
# File 'app/components/solrengine/ui/token_row_component.rb', line 25 def icon_uri token[:icon_uri] end |
#name ⇒ Object
17 18 19 |
# File 'app/components/solrengine/ui/token_row_component.rb', line 17 def name token[:name] end |
#symbol ⇒ Object
13 14 15 |
# File 'app/components/solrengine/ui/token_row_component.rb', line 13 def symbol token[:symbol] end |
#usd_value ⇒ Object
29 30 31 |
# File 'app/components/solrengine/ui/token_row_component.rb', line 29 def usd_value token[:usd_value] end |