Class: Facemock::AuthorizationCode

Inherits:
Database::Table show all
Defined in:
lib/facemock/authorization_code.rb

Constant Summary collapse

TABLE_NAME =
:authorization_codes
COLUMN_NAMES =
[:id, :string, :user_id, :created_at]

Constants inherited from Database::Table

Database::Table::CHILDREN

Instance Method Summary collapse

Methods inherited from Database::Table

all, children, #column_names, column_names, column_type, create!, #destroy, #fetch, first, last, #method_missing, method_missing, #persisted?, #save!, table_info, #table_name, table_name, #update_attributes!, where

Constructor Details

#initialize(options = {}) ⇒ AuthorizationCode

Returns a new instance of AuthorizationCode.



8
9
10
11
12
13
14
# File 'lib/facemock/authorization_code.rb', line 8

def initialize(options={})
  opts = Hashie::Mash.new(options)
  @id         = opts.id
  @string     = opts.string || rand(36**255).to_s(36)
  @user_id    = opts.user_id
  @created_at = opts.created_at
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Facemock::Database::Table