Sha256: b966c5e56684bc242a9ae4277c65eab7dcb7241727abc4c8aa46f85d5c38bf74

Contents?: true

Size: 397 Bytes

Versions: 6

Compression:

Stored size: 397 Bytes

Contents

class Contact
  extend ActiveModel::Naming
  include ActiveModel::Conversion

  attr_accessor :id, :name, :age, :created_at, :awesome, :preferences

  def social
    %w(twitter github)
  end

  def network
    { git: :github }
  end

  def initialize(options = {})
    options.each { |name, value| send("#{name}=", value) }
  end

  def pseudonyms
    nil
  end

  def persisted?
    id
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
msgpack_rails-0.4.3 test/msgpack_rails/models/contact.rb
msgpack_rails-0.4.2 test/msgpack_rails/models/contact.rb
msgpack_rails-0.4.1 test/msgpack_rails/models/contact.rb
msgpack_rails-0.4.0 test/msgpack_rails/models/contact.rb
msgpack_rails-0.3.0 test/msgpack_rails/models/contact.rb
msgpack_rails-0.1.0 test/msgpack_rails/models/contact.rb