Class: Scrooge::Optimizations::Columns::UnscroogedAttributes
- Inherits:
-
Hash
- Object
- Hash
- Scrooge::Optimizations::Columns::UnscroogedAttributes
- Defined in:
- lib/optimizations/columns/attributes_proxy.rb
Class Method Summary collapse
-
.setup(record) ⇒ Object
Hash container for attributes when scrooge is not used.
Instance Method Summary collapse
-
#fully_fetched ⇒ Object
Don’t try to reload one of these.
-
#update(hash) ⇒ Object
(also: #merge!)
Must call to_hash - other hash may be ScroogedAttributes and must be fully fetched if so.
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_fetched ⇒ Object
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 |