Sha256: 57f3e65f38076db7fad77e9bdcfcb9061d61812cff2d28042b4c01f00c04160c

Contents?: true

Size: 415 Bytes

Versions: 2

Compression:

Stored size: 415 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 do; attr_accessor "#{account}"; end
        self.instance_variable_set("@#{account}", value)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
coder_wally-0.1.0 lib/coder_wally/account.rb
coder_wally-0.0.7 lib/coder_wally/account.rb