Module: Imagery::Faking

Defined in:
lib/imagery/faking.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
# File 'lib/imagery/faking.rb', line 3

def self.included(base)
  base.extend ClassMethods
end

Instance Method Details

#deleteObject

Implement the stubbed version of save and skips actual operation if Imagery::Model.mode == :fake



84
85
86
87
88
# File 'lib/imagery/faking.rb', line 84

def delete
  return true if self.class.mode == :fake

  super
end

#save(io, key = nil) ⇒ Object

Implement the stubbed version of save and skips actual operation if Imagery::Model.mode == :fake



76
77
78
79
80
# File 'lib/imagery/faking.rb', line 76

def save(io, key = nil)
  return true if self.class.mode == :fake

  super
end