Class: OfIf::File::Line
- Inherits:
-
Struct
- Object
- Struct
- OfIf::File::Line
- Defined in:
- lib/of_if/file.rb
Overview
Line responds to content and indentation length of a single line.
Instance Attribute Summary collapse
-
#raw ⇒ Object
Returns the value of attribute raw.
Instance Method Summary collapse
Instance Attribute Details
#raw ⇒ Object
Returns the value of attribute raw
8 9 10 |
# File 'lib/of_if/file.rb', line 8 def raw @raw end |
Instance Method Details
#comment? ⇒ Boolean
9 |
# File 'lib/of_if/file.rb', line 9 def comment? = raw.lstrip.start_with?('#') |
#content_length ⇒ Object
11 |
# File 'lib/of_if/file.rb', line 11 def content_length = raw.lstrip.length |
#indent_length ⇒ Object
12 |
# File 'lib/of_if/file.rb', line 12 def indent_length = length - content_length |
#length ⇒ Object
10 |
# File 'lib/of_if/file.rb', line 10 def length = raw.length |