Class: ExtractI18n::HTMLExtractor::Match::BaseMatch
- Defined in:
- lib/extract_i18n/html_extractor/match/base_match.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#node ⇒ Object
readonly
Returns the value of attribute node.
Attributes inherited from NodeMatch
Instance Method Summary collapse
-
#initialize(document, node, text) ⇒ BaseMatch
constructor
A new instance of BaseMatch.
- #replace_text! ⇒ Object
Methods inherited from NodeMatch
#to_s, #translation_key_object
Constructor Details
#initialize(document, node, text) ⇒ BaseMatch
Returns a new instance of BaseMatch.
7 8 9 10 |
# File 'lib/extract_i18n/html_extractor/match/base_match.rb', line 7 def initialize(document, node, text) super(document, text) @node = node end |
Instance Attribute Details
#node ⇒ Object (readonly)
Returns the value of attribute node.
5 6 7 |
# File 'lib/extract_i18n/html_extractor/match/base_match.rb', line 5 def node @node end |
Instance Method Details
#replace_text! ⇒ Object
12 13 14 |
# File 'lib/extract_i18n/html_extractor/match/base_match.rb', line 12 def replace_text! node.content = translation_key_object end |