Class: Scrooge::Optimizations::Columns::UnscroogedAttributes

Inherits:
Hash
  • Object
show all
Defined in:
lib/optimizations/columns/attributes_proxy.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.setup(record) ⇒ Object

Hash container for attributes when scrooge is not used



9
10
11
# File 'lib/optimizations/columns/attributes_proxy.rb', line 9

def self.setup(record)
  new.replace(record)
end

Instance Method Details

#fully_fetchedObject

Don’t try to reload one of these



24
25
26
# File 'lib/optimizations/columns/attributes_proxy.rb', line 24

def fully_fetched
  true
end

#update(hash) ⇒ Object Also known as: merge!

Must call to_hash - other hash may be ScroogedAttributes and must be fully fetched if so



16
17
18
# File 'lib/optimizations/columns/attributes_proxy.rb', line 16

def update(hash)
  super(hash.to_hash)
end