class Widening

Parse, model, and print a line too wide for its own good

Attributes

filename[RW]
line[RW]
line_number[RW]

Public Class Methods

new(filename, line_number, line) click to toggle source
# File lib/cowl.rb, line 75
def initialize(filename, line_number, line)
    @filename = filename
    @line_number = line_number
    @line = line
end
parse(filename, grep_line) click to toggle source
# File lib/cowl.rb, line 66
def self.parse(filename, grep_line)
    match = grep_line.match(/^(.+)\:(.+)$/)

    line_number = match[1]
    line = match[2]

    Widening.new(filename, line_number, line)
end

Public Instance Methods

to_s() click to toggle source
# File lib/cowl.rb, line 81
def to_s
    "#{filename}:#{line_number}:#{line}"
end