Class: Object

Inherits:
BasicObject
Defined in:
lib/Object/object.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.attr_reader(*vars) ⇒ Object



2
3
4
5
6
# File 'lib/Object/object.rb', line 2

def self.attr_reader(*vars)
  @attributes ||= []
  @attributes.concat vars
  super(*vars)
end

.attributesObject



8
9
10
11
# File 'lib/Object/object.rb', line 8

def self.attributes
  @attributes ||= []
  @attributes
end

Instance Method Details

#attributesObject



13
14
15
# File 'lib/Object/object.rb', line 13

def attributes
  self.class.attributes
end