Class: Shutterbug::Service::JSFile

Inherits:
RackFile
  • Object
show all
Defined in:
lib/shutterbug/service.rb

Instance Method Summary collapse

Methods inherited from RackFile

#each, #size

Constructor Details

#initialize(_filename) ⇒ JSFile

Returns a new instance of JSFile.



29
30
31
# File 'lib/shutterbug/service.rb', line 29

def initialize(_filename)
  @javascript = File.read(_filename).gsub(/CONVERT_PATH/,Shutterbug::Rackapp::CONVERT_PATH)
end

Instance Method Details

#openObject



32
33
34
# File 'lib/shutterbug/service.rb', line 32

def open
  @stream_file = StringIO.new(@javascript)
end