Class: Bitodeme::Resource::Base
- Inherits:
-
Object
- Object
- Bitodeme::Resource::Base
- Extended by:
- SingleForwardable
- Defined in:
- lib/bitodeme/resources/base.rb
Overview
Base class for all Bitodeme resources
Direct Known Subclasses
Currency, Deposit, Fund, FundAddress, Invoice, TransactionLog, Withdrawal
Instance Method Summary collapse
Instance Method Details
#to_h ⇒ Object
45 46 47 48 49 50 |
# File 'lib/bitodeme/resources/base.rb', line 45 def to_h attrs.each_with_object({}) do |attr, hash| val = instance_variable_get(:"@#{attr}") hash[attr] = val unless val.nil? end end |