Class: I18nContextGenerator::Searcher::Match

Inherits:
Data
  • Object
show all
Defined in:
lib/i18n_context_generator/searcher.rb

Overview

Represents a code match with surrounding context

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file:, line:, match_line: '', context: '', enclosing_scope: nil) ⇒ Match

Returns a new instance of Match.



20
21
22
# File 'lib/i18n_context_generator/searcher.rb', line 20

def initialize(file:, line:, match_line: '', context: '', enclosing_scope: nil)
  super
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context

Returns:

  • (Object)

    the current value of context



19
20
21
# File 'lib/i18n_context_generator/searcher.rb', line 19

def context
  @context
end

#enclosing_scopeObject (readonly)

Returns the value of attribute enclosing_scope

Returns:

  • (Object)

    the current value of enclosing_scope



19
20
21
# File 'lib/i18n_context_generator/searcher.rb', line 19

def enclosing_scope
  @enclosing_scope
end

#fileObject (readonly)

Returns the value of attribute file

Returns:

  • (Object)

    the current value of file



19
20
21
# File 'lib/i18n_context_generator/searcher.rb', line 19

def file
  @file
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



19
20
21
# File 'lib/i18n_context_generator/searcher.rb', line 19

def line
  @line
end

#match_lineObject (readonly)

Returns the value of attribute match_line

Returns:

  • (Object)

    the current value of match_line



19
20
21
# File 'lib/i18n_context_generator/searcher.rb', line 19

def match_line
  @match_line
end