Class: Bridgetown::Converters::Identity

Inherits:
Bridgetown::Converter show all
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

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

#matchesBoolean

Returns true since it always matches.

Returns:

  • (Boolean)

    true since it always matches.



13
14
15
# File 'lib/bridgetown-core/converters/identity.rb', line 13

def matches(*)
  true
end

#output_ext(ext) ⇒ String

Returns The output file extension (including the dot).

Parameters:

  • ext (String)

    the extension of the original file

Returns:

  • (String)

    The output file extension (including the dot)



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

def output_ext(ext)
  ext
end