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