Class: Middleman::CachingProxy::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

Returns a new instance of CachedResource.



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

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

Instance Method Details

#binary?Boolean

Returns:

  • (Boolean)


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

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

#content_typeObject



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

def content_type
  "text/html"
end

#destination_pathObject



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

def destination_path
  path[1..-1]
end

#extObject



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

def ext
  ""
end

#ignored?Boolean

Returns:

  • (Boolean)


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

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

#source_fileObject



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

def source_file
  cached_path
end