Class: Basecamp3::Model Abstract

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

Overview

This class is abstract.

A base class for models

Constant Summary

REQUIRED_FIELDS =
[]

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ Model

Returns a new instance of Model



7
8
9
10
11
# File 'lib/basecamp3/model.rb', line 7

def initialize(data = {})
  data.each do |attr, value|
    instance_variable_set("@#{attr}", value)
  end
end