Class: Modloc::Source::Line
- Inherits:
-
String
- Object
- String
- Modloc::Source::Line
- Defined in:
- lib/modloc/source/line.rb
Overview
A line string
Instance Method Summary collapse
-
#initialize(contents) ⇒ Line
constructor
initialize a new line object.
-
#strip ⇒ Modloc::Source::Line
Strip the line of whitespace and comments.
Constructor Details
#initialize(contents) ⇒ Line
initialize a new line object
6 7 8 |
# File 'lib/modloc/source/line.rb', line 6 def initialize(contents) super contents end |
Instance Method Details
#strip ⇒ Modloc::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 |