Class: Redd::Models::Model

Inherits:
Object
  • Object
show all
Includes:
LazyLazer
Defined in:
lib/redd/models/model.rb

Overview

A base model class.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, attributes = {}) ⇒ Model

Create a new Model.

Parameters:

  • client (Client)

    the model's client

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

    the model's attributes


17
18
19
20
# File 'lib/redd/models/model.rb', line 17

def initialize(client, attributes = {})
  super(attributes)
  @client = client
end

Instance Attribute Details

#clientClient (readonly)

Returns the model's client.

Returns:

  • (Client)

    the model's client


12
13
14
# File 'lib/redd/models/model.rb', line 12

def client
  @client
end