class ExtractI18n::HTMLExtractor::Match::NodeMatch

Attributes

document[R]
key[W]
text[R]

Public Class Methods

new(document, text) click to toggle source
# File lib/extract_i18n/html_extractor/match/node_match.rb, line 7
def initialize(document, text)
  @document = document
  @text = text
end

Public Instance Methods

key() click to toggle source
# File lib/extract_i18n/html_extractor/match/node_match.rb, line 22
def key
  @key ||= text.parameterize.underscore
end
replace_text!() click to toggle source
# File lib/extract_i18n/html_extractor/match/node_match.rb, line 16
def replace_text!
  raise NotImplementedError
end
translation_key_object() click to toggle source
# File lib/extract_i18n/html_extractor/match/node_match.rb, line 12
def translation_key_object
  "t('.#{key}')"
end