Class: XRBP::Model::Validator

Inherits:
Base
  • Object
show all
Extended by:
Base::ClassMethods
Defined in:
lib/xrbp/model/validator.rb

Instance Attribute Summary

Attributes included from Base::ClassMethods

#connection, #opts

Attributes inherited from Base

#connection, #opts

Class Method Summary collapse

Methods included from Base::ClassMethods

set_opts

Methods inherited from Base

#full_opts, #initialize, #set_opts

Constructor Details

This class inherits a constructor from XRBP::Model::Base

Class Method Details

.all(opts = {}) ⇒ Object

Retrieve list of validators via WebClient::Connection

Parameters:

  • opts (Hash) (defaults to: {})

    options to retrieve validator list with

Options Hash (opts):



13
14
15
16
17
18
19
20
21
# File 'lib/xrbp/model/validator.rb', line 13

def self.all(opts={})
  set_opts(opts)
  connection.url = "https://data.ripple.com/v2/network/validators/"

  connection.add_plugin :result_parser     unless connection.plugin?(:result_parser)
  connection.add_plugin Parsers::Validator unless connection.plugin?(Parsers::Validator)

  connection.perform
end