Module: Hive

Defined in:
lib/hive.rb,
lib/hive/api.rb,
lib/hive/utils.rb,
lib/hive/bridge.rb,
lib/hive/stream.rb,
lib/hive/jsonrpc.rb,
lib/hive/marshal.rb,
lib/hive/version.rb,
lib/hive/block_api.rb,
lib/hive/broadcast.rb,
lib/hive/formatter.rb,
lib/hive/operation.rb,
lib/hive/base_error.rb,
lib/hive/transaction.rb,
lib/hive/type/amount.rb,
lib/hive/chain_config.rb,
lib/hive/type/base_type.rb,
lib/hive/mixins/jsonable.rb,
lib/hive/rpc/base_client.rb,
lib/hive/rpc/http_client.rb,
lib/hive/mixins/retriable.rb,
lib/hive/mixins/serializable.rb,
lib/hive/transaction_builder.rb,
lib/hive/rpc/thread_safe_http_client.rb

Defined Under Namespace

Modules: ChainConfig, Fallback, JSONable, RPC, Retriable, Serializable, Type, Utils Classes: Api, ArgumentError, AuthorNotFoundError, BadOrMissingUpstreamResponseError, BaseError, BlockApi, BlockTooOldError, Bridge, Broadcast, DeserializationError, DuplicateTransactionError, EmptyTransactionError, Formatter, IncorrectRequestIdError, IncorrectResponseIdError, InvalidAccountError, IrrelevantSignatureError, JsonRpcBatchMaximumSizeExceededError, Jsonrpc, Marshal, MethodNotEnabledError, MissingActiveAuthorityError, MissingAuthorityError, MissingOtherAuthorityError, MissingOwnerAuthorityError, MissingPostingAuthorityError, NonCanonicalSignatureError, NonZeroRequiredError, NotAppBaseError, Operation, PluginNotEnabledError, ReachedMaximumTimeError, RemoteDatabaseLockError, RemoteInternalError, RemoteNodeError, RemoteServerError, RequestTimeoutUpstreamResponseError, SerializationMismatchError, Stream, TheftError, TooManyRetriesError, TooManyTimeoutsError, Transaction, TransactionBuilder, TransactionExpiredError, TransactionIndexDisabledError, TypeError, UnexpectedAssetError, UnknownApiError, UnknownError, UnknownMethodError, UnknownOperationError, UnsupportedChainError, UpstreamResponseError, VirtualOperationsNotAllowedError

Constant Summary collapse

VERSION =
'1.0.5'
AGENT_ID =
"hive-ruby/#{VERSION}"

Class Method Summary collapse

Class Method Details

.api_classesObject



79
80
81
# File 'lib/hive.rb', line 79

def self.api_classes
  @api_classes ||= {}
end

.const_missing(const) ⇒ Object



83
84
85
86
87
88
89
90
# File 'lib/hive.rb', line 83

def self.const_missing(const)
  super unless const.to_s.end_with? 'Api'
  
  api = api_classes[const]
  api ||= Api.clone(freeze: false) rescue Api.clone
  api.api_name = const
  api_classes[const] = api
end