Sha256: 092fc8fcf8d253c7e75267cde0994e98378e9f7997d7e30a4db50c582ab69eac
Contents?: true
Size: 387 Bytes
Versions: 10
Compression:
Stored size: 387 Bytes
Contents
class User attr_accessor :name, :account, :email def initialize name, email = nil, options = {} @name = name @email = email set_option_vars options end def set_option_vars options = {} options.each_pair do |name, value| var = :"@#{name}" self.instance_variable_set(var, value) end end def email @email ||= 'default@gmail.com' end end
Version data entries
10 entries across 10 versions & 1 rubygems