Class: Coradoc::CoreModel::FrontmatterBlock::FieldTransform::Base
- Inherits:
-
Object
- Object
- Coradoc::CoreModel::FrontmatterBlock::FieldTransform::Base
- Defined in:
- lib/coradoc/core_model/frontmatter/field_transform.rb
Overview
Base class. Override #applies? and #apply in subclasses.
Instance Method Summary collapse
-
#applies?(direction:, format:) ⇒ Boolean
Override: return true if this transform should fire for the given direction (:to_format or :from_format) and format (:markdown, :asciidoc, etc.).
-
#apply(block) ⇒ Object
Override: receive a FrontmatterBlock, return a (possibly new) FrontmatterBlock.
Instance Method Details
#applies?(direction:, format:) ⇒ Boolean
Override: return true if this transform should fire for the given direction (:to_format or :from_format) and format (:markdown, :asciidoc, etc.).
19 20 21 |
# File 'lib/coradoc/core_model/frontmatter/field_transform.rb', line 19 def applies?(direction:, format:) # rubocop:disable Lint/UnusedMethodArgument false end |
#apply(block) ⇒ Object
Override: receive a FrontmatterBlock, return a (possibly new) FrontmatterBlock. Never mutate the input.
25 26 27 |
# File 'lib/coradoc/core_model/frontmatter/field_transform.rb', line 25 def apply(block) block end |