class AdLint::Cpp::IfSection

Attributes

elif_groups[R]
else_group[R]
endif_line[R]
if_group[R]

Public Class Methods

new(if_group, elif_groups, else_group, endif_line) click to toggle source
# File lib/adlint/cpp/syntax.rb, line 128
def initialize(if_group, elif_groups, else_group, endif_line)
  @if_group    = if_group
  @elif_groups = elif_groups
  @else_group  = else_group
  @endif_line  = endif_line
end

Public Instance Methods

inspect(indent = 0) click to toggle source
# File lib/adlint/cpp/syntax.rb, line 144
def inspect(indent = 0)
  [" " * indent + short_class_name,
    @if_group ? @if_group.inspect(indent + 1) : nil,
    @elif_groups ? @elif_groups.inspect(indent + 1) : nil,
    @else_group ? @else_group.inspect(indent + 1) : nil,
    @endif_line ? @endif_line.inspect(indent + 1) : nil
  ].compact.join("\n")
end
location() click to toggle source
# File lib/adlint/cpp/syntax.rb, line 140
def location
  @if_group.location
end