Sha256: c783bca4149632aa330941d2fb8825829f5ef572e8e0e2c7878c15402b44d926
Contents?: true
Size: 645 Bytes
Versions: 30
Compression:
Stored size: 645 Bytes
Contents
module Pageflow class UsedFile < SimpleDelegator def initialize(file, usage = nil) super(file) @file = file @usage = usage || file.usages.first end def configuration @usage.configuration end def update_attributes!(attributes) super(attributes.except(:configuration)) @usage.update_attributes!(attributes.slice(:configuration)) end def usage_id @usage.id end # Not delegated by default. Required to allow using instances in # Active Record conditions. def is_a?(klass) @file.is_a?(klass) end def class @file.class end end end
Version data entries
30 entries across 30 versions & 1 rubygems