Class: Defmastership::Modifier::ReplacementFormatter

Inherits:
Object
  • Object
show all
Extended by:
Memoist
Defined in:
lib/defmastership/modifier/replacement_formatter.rb

Overview

A small, single-purpose class to format a ref replacement string.

Instance Method Summary collapse

Constructor Details

#initialize(match_data, document, key) ⇒ ReplacementFormatter

Returns a new instance of ReplacementFormatter.

Parameters:

  • match_data (MatchData)

    of the ref statement

  • document (Document)

    the overall parsed document

  • key (Symbol)

    the key to access the reference in match_data



17
18
19
20
21
# File 'lib/defmastership/modifier/replacement_formatter.rb', line 17

def initialize(match_data, document, key)
  @match_data = match_data
  @document = document
  @key = key
end