class Envjs::Net::File::Response

Attributes

body[R]
code[R]

Public Class Methods

new(path) click to toggle source
# File lib/envjs/net/file.rb, line 33
def initialize path
  @path = path
  @file = File.new @path
  @body = @file.read
  @code = @file.nil? ? "404" : "200";
  @file.close
end

Public Instance Methods

[](*args) click to toggle source
# File lib/envjs/net/file.rb, line 41
def [] *args
  nil
end
each(&block) click to toggle source
# File lib/envjs/net/file.rb, line 45
def each &block
end
getContentEncoding() click to toggle source
# File lib/envjs/net/file.rb, line 52
def getContentEncoding
  nil
end
getHeaderFields() click to toggle source
# File lib/envjs/net/file.rb, line 48
def getHeaderFields
  []
end
getInputStream() click to toggle source
# File lib/envjs/net/file.rb, line 61
def getInputStream
  self
end
getResponseCode() click to toggle source
# File lib/envjs/net/file.rb, line 56
def getResponseCode
  @file.nil? ? 404 : 200;
end