Class: Pechkin::Model

Inherits:
Object
  • Object
show all
Defined in:
lib/pechkinrb/model.rb

Overview

Basic class for API model objects

Direct Known Subclasses

List, Member

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(connection, doc) ⇒ Model

Initialize new model instance

Parameters:

  • connection (Pachkin::Connection)

    Active connection

  • doc (Hash)

    API object data


12
13
14
15
# File 'lib/pechkinrb/model.rb', line 12

def initialize(connection, doc)
  @connection = connection
  @raw = doc
end

Instance Attribute Details

#rawObject (readonly)

API object data


6
7
8
# File 'lib/pechkinrb/model.rb', line 6

def raw
  @raw
end