lib/stellar/dsl.rb in stellar-base-0.26.0 vs lib/stellar/dsl.rb in stellar-base-0.27.0

- old
+ new

@@ -25,10 +25,13 @@ predicate: ClaimPredicate(&block) ) ) end + # @param [Asset, String, nil] subject + # @return [Stellar::Asset] instance of the Stellar::Asset + # @raise [TypeError] if subject cannot be converted to Stellar::Asset def Asset(subject = nil) case subject when Asset subject when nil, /^(XLM[-:])?native$/ @@ -43,9 +46,10 @@ end # Generates Stellar::Keypair from subject, use Stellar::Client.to_keypair as shortcut. # @param subject [String|Stellar::Account|Stellar::PublicKey|Stellar::SignerKey|Stellar::Keypair] subject. # @return [Stellar::Keypair] Stellar::Keypair instance. + # @raise [TypeError] if subject cannot be converted to Stellar::KeyPair def KeyPair(subject = nil) case subject when ->(subj) { subj.respond_to?(:to_keypair) } subject.to_keypair when PublicKey