class Sprockets::Asset
def init_with(environment, coder)
def init_with(environment, coder) @environment = environment @pathname = @mtime = @length = nil self.class.serialized_attributes.each do |attr| instance_variable_set("@#{attr}", coder[attr].to_s) if coder[attr] end if @pathname && @pathname.is_a?(String) # Expand `$root` placeholder and wrapper string in a `Pathname` @pathname = Pathname.new(expand_root_path(@pathname)) end if @mtime && @mtime.is_a?(String) # Parse time string @mtime = Time.parse(@mtime) end if @length && @length.is_a?(String) # Convert length to an `Integer` @length = Integer(@length) end end