Class: I18nContextGenerator::AndroidResource::Span

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#base_keyObject (readonly)

Returns the value of attribute base_key

Returns:

  • (Object)

    the current value of base_key



15
16
17
# File 'lib/i18n_context_generator/android_resource.rb', line 15

def base_key
  @base_key
end

#end_lineObject (readonly)

Returns the value of attribute end_line

Returns:

  • (Object)

    the current value of end_line



15
16
17
# File 'lib/i18n_context_generator/android_resource.rb', line 15

def end_line
  @end_line
end

#keyObject (readonly)

Returns the value of attribute key

Returns:

  • (Object)

    the current value of key



15
16
17
# File 'lib/i18n_context_generator/android_resource.rb', line 15

def key
  @key
end

#parent_end_lineObject (readonly)

Returns the value of attribute parent_end_line

Returns:

  • (Object)

    the current value of parent_end_line



15
16
17
# File 'lib/i18n_context_generator/android_resource.rb', line 15

def parent_end_line
  @parent_end_line
end

#parent_start_lineObject (readonly)

Returns the value of attribute parent_start_line

Returns:

  • (Object)

    the current value of parent_start_line



15
16
17
# File 'lib/i18n_context_generator/android_resource.rb', line 15

def parent_start_line
  @parent_start_line
end

#resource_typeObject (readonly)

Returns the value of attribute resource_type

Returns:

  • (Object)

    the current value of resource_type



15
16
17
# File 'lib/i18n_context_generator/android_resource.rb', line 15

def resource_type
  @resource_type
end

#start_lineObject (readonly)

Returns the value of attribute start_line

Returns:

  • (Object)

    the current value of start_line



15
16
17
# File 'lib/i18n_context_generator/android_resource.rb', line 15

def start_line
  @start_line
end

Instance Method Details

#cover?(line_number) ⇒ Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/i18n_context_generator/android_resource.rb', line 24

def cover?(line_number)
  line_span.cover?(line_number)
end

#line_spanObject



16
17
18
# File 'lib/i18n_context_generator/android_resource.rb', line 16

def line_span
  start_line..end_line
end

#parent_line_spanObject



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

def parent_line_span
  parent_start_line..parent_end_line
end