Method: Sass::Tree::CommentNode#lines

Defined in:
lib/sass/tree/comment_node.rb

#linesInteger

Returns the number of lines in the comment.

Returns:

  • (Integer)


63
64
65
66
67
68
# File 'lib/sass/tree/comment_node.rb', line 63

def lines
  @value.inject(0) do |s, e|
    next s + e.count("\n") if e.is_a?(String)
    next s
  end
end