Permalink
Browse files

removing more cruft

  • Loading branch information...
1 parent 7c35a6c commit e3d241174418cd2e8d269336781dbc5ad861a267 @tenderlove committed Jul 17, 2013
Showing with 3 additions and 11 deletions.
  1. +3 −11 app/models/account.rb
View
@@ -1,11 +1,4 @@
class Account
- #has_many :names
- #has_many :nicks
- #has_many :sites
- #has_many :services
- #has_many :portraits
- #has_many :books
-
attr_accessor :username
attr_reader :names, :nicks, :sites, :portraits, :services, :books
@@ -16,8 +9,8 @@ class Account
Service = Struct.new :name, :key
Book = Struct.new :key, :isbn
- def initialize
- @username = nil
+ def initialize username
+ @username = username
@names = []
@nicks = []
@sites = []
@@ -40,8 +33,7 @@ def self.import io
list = yamler.load io
list.map do |record|
- account = Account.new
- account.username = record['account']
+ account = Account.new record['account']
(record['name'] || []).each do |name|
account.names << Name.new(name)

0 comments on commit e3d2411

Please sign in to comment.