Class: Bridgetown::Converters::Identity
- Inherits:
-
Bridgetown::Converter
- Object
- Plugin
- Bridgetown::Converter
- Bridgetown::Converters::Identity
- Defined in:
- 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
-
#matches(_ext) ⇒ Object
Public: Does the given extension match this converter's list of acceptable extensions? Takes one argument: the file's extension (including the dot).
-
#output_ext(ext) ⇒ Object
Public: The extension to be given to the output file (including the dot).
Methods inherited from Bridgetown::Converter
#convert, #initialize, input, #inspect, #line_start, support_slots, supports_slots?
Methods inherited from Plugin
Methods included from Prioritizable
Constructor Details
This class inherits a constructor from Bridgetown::Converter
Instance Method Details
#matches(_ext) ⇒ Object
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 'lib/bridgetown-core/converters/identity.rb', line 18 def matches(_ext) 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 'lib/bridgetown-core/converters/identity.rb', line 27 def output_ext(ext) ext end |