Class: CachedResource

Inherits:
Object
  • Object
show all
Includes:
Autostruct::Wrap
Defined in:
lib/middleman/caching_proxy/cached_resource.rb

Instance Method Summary collapse

Constructor Details

#initialize(path:, cached_path:, build_path:) ⇒ CachedResource



4
# File 'lib/middleman/caching_proxy/cached_resource.rb', line 4

def initialize(path:, cached_path:, build_path:); end

Instance Method Details

#binary?Boolean



19
20
21
# File 'lib/middleman/caching_proxy/cached_resource.rb', line 19

def binary?
  true # Seems to mean "do a binary copy or make a rack request?"
end

#content_typeObject



27
28
29
# File 'lib/middleman/caching_proxy/cached_resource.rb', line 27

def content_type
  "text/html"
end

#destination_pathObject



7
8
9
# File 'lib/middleman/caching_proxy/cached_resource.rb', line 7

def destination_path
  path[1..-1]
end

#extObject



11
12
13
# File 'lib/middleman/caching_proxy/cached_resource.rb', line 11

def ext
  ""
end

#ignored?Boolean



15
16
17
# File 'lib/middleman/caching_proxy/cached_resource.rb', line 15

def ignored?
  false # Seems to mean "actually include in build?"
end

#source_fileObject



23
24
25
# File 'lib/middleman/caching_proxy/cached_resource.rb', line 23

def source_file
  cached_path
end