class AdLint::CodeStructure

DESCRIPTION

Base class of code structure information.

Public Instance Methods

print_as_csv(io) click to toggle source
to_s() click to toggle source

DESCRIPTION

Converts this code structure information into string representation.

RETURN VALUE

StringString representation.

# File lib/adlint/code.rb, line 46
def to_s
  delim = ",".to_default_external
  to_a.map { |obj| obj.to_s.to_default_external }.join(delim)
end

Private Instance Methods

to_a() click to toggle source

DESCRIPTION

Converts this code structure information into array representation.

Subclasses must implement this method.

RETURN VALUE

Array< Object > – Array representation.

# File lib/adlint/code.rb, line 59
def to_a
  subclass_responsibility
end
to_csv() click to toggle source
# File lib/adlint/code.rb, line 63
def to_csv
  to_a.map { |obj| obj ? obj.to_s.to_default_external : nil }.to_csv
end