Method: Stellar::DSL.Account
- Defined in:
- lib/stellar/dsl.rb
.Account(subject = nil) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/stellar/dsl.rb', line 30 def Account(subject = nil) case subject when Account subject when /^M[A-Z0-9]{68}$/ Account.from_address(subject.to_str) when nil Account.random else begin keypair = KeyPair(subject) Account.new(keypair) rescue TypeError raise TypeError, "Cannot convert #{subject.inspect} to Stellar::Account" end end end |