Class: Bitreserve::Entities::BaseEntity

Inherits:
Object
  • Object
show all
Defined in:
lib/bitreserve/entities/base_entity.rb

Direct Known Subclasses

Asset, AuthToken, Card, Contact, Phone, Ticker, Transaction, User

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ BaseEntity

Returns a new instance of BaseEntity.



10
11
12
# File 'lib/bitreserve/entities/base_entity.rb', line 10

def initialize(attributes = {})
  instantiate_variables(attributes)
end

Class Method Details

.from_collection(entities) ⇒ Object



4
5
6
7
8
# File 'lib/bitreserve/entities/base_entity.rb', line 4

def self.from_collection(entities)
  entities.map do |entity|
    new(entity)
  end
end