Class: Modloc::Source::Line

Inherits:
String
  • Object
show all
Defined in:
lib/modloc/source/line.rb

Overview

A line string

Instance Method Summary collapse

Constructor Details

#initialize(contents) ⇒ Line

initialize a new line object

Parameters:

  • contents (String)


6
7
8
# File 'lib/modloc/source/line.rb', line 6

def initialize(contents)
  super contents
end

Instance Method Details

#stripModloc::Source::Line

Strip the line of whitespace and comments



12
13
14
15
# File 'lib/modloc/source/line.rb', line 12

def strip
  val = super.concat "\n"
  val.strip_comment
end