Class: CoderWally::Account
- Inherits:
-
Object
- Object
- CoderWally::Account
- Defined in:
- lib/coder_wally/account.rb
Overview
Stores the users accounts
Instance Method Summary collapse
-
#initialize(collection_of_accounts) ⇒ Account
constructor
Dynamically create account properties.
Constructor Details
#initialize(collection_of_accounts) ⇒ Account
Dynamically create account properties
6 7 8 9 10 11 |
# File 'lib/coder_wally/account.rb', line 6 def initialize(collection_of_accounts) collection_of_accounts.each do |account, value| singleton_class.class_eval { attr_accessor "#{account}" } instance_variable_set("@#{account}", value) end end |