class Nvlope::Account

Attributes

company[R]
first_name[R]
handle[R]
id[R]
last_name[R]
nvlope[R]
raw[R]
url[R]

Public Class Methods

new(nvlope, raw) click to toggle source
# File lib/nvlope/account.rb, line 3
def initialize nvlope, raw
  @nvlope = nvlope
  @id         = raw['id']
  @handle     = raw['handle']
  @first_name = raw['first_name']
  @last_name  = raw['last_name']
  @url        = raw['url']
  @company    = raw['company']
end

Public Instance Methods

inspect() click to toggle source
# File lib/nvlope/account.rb, line 25
def inspect
  values = to_hash.map{|k,v| "#{k}: #{v.inspect}" }.join(', ')
  %(#<#{self.class} #{values}>)
end
to_hash() click to toggle source
# File lib/nvlope/account.rb, line 14
def to_hash
  {
    id:         id,
    handle:     handle,
    first_name: first_name,
    last_name:  last_name,
    url:        url,
    company:    company,
  }
end