Class: Sequence::Hello
- Inherits:
-
Object
- Object
- Sequence::Hello
- Defined in:
- lib/sequence/hello.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(api, ledger_name) ⇒ Hello
constructor
A new instance of Hello.
Constructor Details
#initialize(api, ledger_name) ⇒ Hello
Returns a new instance of Hello.
6 7 8 9 |
# File 'lib/sequence/hello.rb', line 6 def initialize(api, ledger_name) @api = api @ledger_name = ledger_name end |
Instance Method Details
#call ⇒ Object
11 12 13 14 |
# File 'lib/sequence/hello.rb', line 11 def call b = @api.post(SecureRandom.hex(10), '/hello', {ledger_name: @ledger_name})[:parsed_body] [b['team_name'], b['addr'], b['addr_ttl_seconds'].to_i] end |