Sha256: 06139f798981b97a328195a9621cab22273f65100e8b123e029bd3ace45a4cac
Contents?: true
Size: 725 Bytes
Versions: 5
Compression:
Stored size: 725 Bytes
Contents
unless defined?(User) class User attr_accessor :age, :city, :name, :first, :float DEFAULT_AGE = 24 DEFAULT_CITY = 'irvine' DEFAULT_NAME = 'rabl' DEFAULT_FIRST = 'bob' DEFAULT_FLOAT = 1234.56 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 self.float = attributes[:float] || DEFAULT_FLOAT end end end unless defined?(NestedScope::User) module NestedScope class User def controller; self; end def controller_name; self.class.name.downcase; end end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
rabl-0.7.8 | test/models/user.rb |
rabl-0.7.7 | test/models/user.rb |
rabl-0.7.6 | test/models/user.rb |
rabl-0.7.5 | test/models/user.rb |
rabl-0.7.4 | test/models/user.rb |