Module: Glamazon::Base::ClassMethods

Defined in:
lib/glamazon/base.rb

Instance Method Summary collapse

Instance Method Details

#allObject



20
21
22
# File 'lib/glamazon/base.rb', line 20

def all
  @__all_instances__ ||= []
end

#create(params = {}) ⇒ Object



24
25
26
# File 'lib/glamazon/base.rb', line 24

def create(params = {})
  new(params).tap { |r| r.save }
end

#destroy_allObject



28
29
30
# File 'lib/glamazon/base.rb', line 28

def destroy_all
  all.clear
end