Module: TaprootCLI
- Defined in:
- lib/cli.rb
Class Method Summary collapse
- .client_token ⇒ Object
- .config ⇒ Object
- .config_current ⇒ Object
- .config_merchant_account ⇒ Object
- .index ⇒ Object
- .url(path = "") ⇒ Object
Class Method Details
.client_token ⇒ Object
14 15 16 |
# File 'lib/cli.rb', line 14 def self.client_token JSON.parse(open(url("client_token")).read) end |
.config ⇒ Object
18 19 20 |
# File 'lib/cli.rb', line 18 def self.config JSON.parse(open(url("config")).read) end |
.config_current ⇒ Object
22 23 24 |
# File 'lib/cli.rb', line 22 def self.config_current JSON.parse(open(url("config/current")).read) end |
.config_merchant_account ⇒ Object
26 27 28 |
# File 'lib/cli.rb', line 26 def self.config_merchant_account JSON.parse(open(url("config/merchant_account")).read) end |
.index ⇒ Object
10 11 12 |
# File 'lib/cli.rb', line 10 def self.index JSON.parse(open(url).read) end |
.url(path = "") ⇒ Object
6 7 8 |
# File 'lib/cli.rb', line 6 def self.url(path="") URI.join("http://localhost:3132", path) end |