Class: Bridgetown::Converters::Identity

Inherits:
Bridgetown::Converter show all
Defined in:
bridgetown-core/lib/bridgetown-core/converters/identity.rb

Overview

Identity converter. Returns same content as given. For more info on converters see https://bridgetownrb.com/docs/plugins/converters/

Instance Method Summary collapse

Methods inherited from Bridgetown::Converter

#convert, #determine_template_engine, #initialize, input, #inspect, #line_start, support_slots, supports_slots?, template_engine

Methods inherited from Plugin

#initialize

Methods included from Prioritizable

#<=>, included

Constructor Details

This class inherits a constructor from Bridgetown::Converter

Instance Method Details

#matchesObject

Public: Does the given extension match this converter’s list of acceptable extensions? Takes one argument: the file’s extension (including the dot).

_ext - The String extension to check (not relevant here)

Returns true since it always matches.



18
19
20
# File 'bridgetown-core/lib/bridgetown-core/converters/identity.rb', line 18

def matches(*)
  true
end

#output_ext(ext) ⇒ Object

Public: The extension to be given to the output file (including the dot).

ext - The String extension or original file.

Returns The String output file extension.



27
28
29
# File 'bridgetown-core/lib/bridgetown-core/converters/identity.rb', line 27

def output_ext(ext)
  ext
end