Class: TagMangler

Inherits:
Object
  • Object
show all
Defined in:
lib/chili_pdf/tag_mangler.rb

Instance Method Summary collapse

Constructor Details

#initialize(src, request_like_object = nil) ⇒ TagMangler

Returns a new instance of TagMangler.



2
3
4
5
# File 'lib/chili_pdf/tag_mangler.rb', line 2

def initialize(src, request_like_object = nil)
  @src_attribute = src # /roy
  @request_like = request_like_object
end

Instance Method Details

#to_absolute_urlObject



11
12
13
# File 'lib/chili_pdf/tag_mangler.rb', line 11

def to_absolute_url
  relative_url? ? "#{base_url}#{relative_url}" : @src_attribute
end

#to_local_srcObject



7
8
9
# File 'lib/chili_pdf/tag_mangler.rb', line 7

def to_local_src
  full_file_path.blank? ? @src_attribute : "file://#{full_file_path}"
end