Class: Ubiquitously::Base

Inherits:
Object show all
Extended by:
ActiveModel::Callbacks
Includes:
ActiveModel::Serialization, ActiveModel::Validations, SubclassableCallbacks
Defined in:
lib/ubiquitously/models/base.rb

Direct Known Subclasses

Page, Post, Service::Account, Service::Post, User

Instance Method Summary collapse

Methods included from SubclassableCallbacks

included, override

Instance Method Details

#apply(attributes) ⇒ Object



8
9
10
11
12
# File 'lib/ubiquitously/models/base.rb', line 8

def apply(attributes)
  attributes.each do |key, value|
    self.send("#{key.to_s}=", value) if self.respond_to?(key)
  end
end

#debug?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/ubiquitously/models/base.rb', line 14

def debug?
  Ubiquitously.debug?
end