class Contact

Attributes

address[RW]
age[RW]
awesome[RW]
contact[RW]
created_at[RW]
friends[RW]
id[RW]
name[RW]
preferences[RW]

Public Class Methods

new(options = {}) click to toggle source
# File activemodel/test/models/contact.rb, line 21
def initialize(options = {})
  options.each { |name, value| send("#{name}=", value) }
end

Public Instance Methods

attributes() click to toggle source
# File activemodel/test/models/contact.rb, line 39
def attributes
  instance_values.except("address", "friends", "contact")
end
attributes=(hash) click to toggle source
# File activemodel/test/models/contact.rb, line 33
def attributes=(hash)
  hash.each do |k, v|
    instance_variable_set("@#{k}", v)
  end
end
network() click to toggle source
# File activemodel/test/models/contact.rb, line 17
def network
  { git: :github }
end
persisted?() click to toggle source
# File activemodel/test/models/contact.rb, line 29
def persisted?
  id
end
pseudonyms() click to toggle source
# File activemodel/test/models/contact.rb, line 25
def pseudonyms
  nil
end
social() click to toggle source
# File activemodel/test/models/contact.rb, line 13
def social
  %w(twitter github)
end