Sha256: 1878e5871b0eb11698b5ed88b98bc77a731cc0ffd215b689bab3b68813b5915d
Contents?: true
Size: 406 Bytes
Versions: 1
Compression:
Stored size: 406 Bytes
Contents
# All code in the gem is namespaced under this module. module CoderWally # Stores the users accounts class Account # Dynamically create account properties 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 end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
coder_wally-0.1.1 | lib/coder_wally/account.rb |