Class: Bulldog::Stream::ForFile

Inherits:
Base
  • Object
show all
Defined in:
lib/bulldog/stream.rb

Instance Attribute Summary

Attributes inherited from Base

#target

Instance Method Summary collapse

Methods inherited from Base

#content_type, #initialize, #missing?, #reload, #size, #write_to

Constructor Details

This class inherits a constructor from Bulldog::Stream::Base

Instance Method Details

#file_nameObject



125
126
127
# File 'lib/bulldog/stream.rb', line 125

def file_name
  super || File.basename(@target.path)
end

#pathObject



120
121
122
123
# File 'lib/bulldog/stream.rb', line 120

def path
  @target.flush unless @target.closed? rescue IOError  # not open for writing
  super
end