Class: Solrengine::Ui::AirdropButtonComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/solrengine/ui/airdrop_button_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(address:, network: "devnet", action_url: "/airdrop") ⇒ AirdropButtonComponent

Returns a new instance of AirdropButtonComponent.



8
9
10
11
12
# File 'app/components/solrengine/ui/airdrop_button_component.rb', line 8

def initialize(address:, network: "devnet", action_url: "/airdrop")
  @address = address
  @network = network
  @action_url = action_url
end

Instance Attribute Details

#action_urlObject (readonly)

Returns the value of attribute action_url.



6
7
8
# File 'app/components/solrengine/ui/airdrop_button_component.rb', line 6

def action_url
  @action_url
end

#addressObject (readonly)

Returns the value of attribute address.



6
7
8
# File 'app/components/solrengine/ui/airdrop_button_component.rb', line 6

def address
  @address
end

#networkObject (readonly)

Returns the value of attribute network.



6
7
8
# File 'app/components/solrengine/ui/airdrop_button_component.rb', line 6

def network
  @network
end

Instance Method Details

#devnet?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'app/components/solrengine/ui/airdrop_button_component.rb', line 14

def devnet?
  network == "devnet" || network == "testnet"
end