Sha256: b190636d971ae5f4ef009b2e2e07081ae86f20f3bd038b99e6ca6ef5155d4596
Contents?: true
Size: 437 Bytes
Versions: 12
Compression:
Stored size: 437 Bytes
Contents
class User attr_accessor :age, :city, :name DEFAULT_AGE = 24 DEFAULT_CITY = 'irvine' DEFAULT_NAME = 'rabl' def initialize(attributes={}) self.age = attributes[:age] || DEFAULT_AGE self.city = attributes[:city] || DEFAULT_CITY self.name = attributes[:name] || DEFAULT_NAME end end module NestedScope class User def controller; self; end def controller_name; self.class.name.downcase; end end end
Version data entries
12 entries across 12 versions & 1 rubygems