Class: MVM::Scan
- Inherits:
-
Object
- Object
- MVM::Scan
- Defined in:
- lib/mvm/scan.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
-
#initialize ⇒ Scan
constructor
A new instance of Scan.
- #tokens(address, type: nil) ⇒ Object
Constructor Details
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
5 6 7 |
# File 'lib/mvm/scan.rb', line 5 def client @client end |
Instance Method Details
#tokens(address, type: nil) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/mvm/scan.rb', line 11 def tokens(address, type: nil) path = '/api' r = client.get( path, address:, action: 'tokenlist', module: 'account' )['result'] r = r.filter(&->(token) { token['type'] == type }) if type.present? r end |