Sha256: a069658c15c43bd99be4783dd4e39015ebdae8e01239e2cbdfd73af46fb65a48

Contents?: true

Size: 493 Bytes

Versions: 36

Compression:

Stored size: 493 Bytes

Contents

require 'sass/tree/node'

module Sass::Tree
  class CommentNode < ValueNode
    def initialize(value, style)
      super(value[2..-1].strip, style)
    end

    def to_s(tabs = 0, parent_name = nil)
      return if @style == :compressed

      spaces = '  ' * (tabs - 1)
      join_string = @style == :compact ? ' ' : "\n#{spaces} * "
      str = "#{spaces}/* #{value}"
      str << join_string unless children.empty?
      str << "#{children.join join_string} */"
      str
    end
  end
end

Version data entries

36 entries across 36 versions & 5 rubygems

Version Path
radiantcms-couchrest_model-0.2.4 vendor/plugins/haml/lib/sass/tree/comment_node.rb
radiantcms-couchrest_model-0.2.2 vendor/plugins/haml/lib/sass/tree/comment_node.rb
radiantcms-couchrest_model-0.2.1 vendor/plugins/haml/lib/sass/tree/comment_node.rb
radiantcms-couchrest_model-0.2 vendor/plugins/haml/lib/sass/tree/comment_node.rb
radiantcms-couchrest_model-0.1.9 vendor/plugins/haml/lib/sass/tree/comment_node.rb
radiantcms-couchrest_model-0.1.8 vendor/plugins/haml/lib/sass/tree/comment_node.rb
radiantcms-couchrest_model-0.1.7 vendor/plugins/haml/lib/sass/tree/comment_node.rb
radiantcms-couchrest_model-0.1.6 vendor/plugins/haml/lib/sass/tree/comment_node.rb
radiantcms-couchrest_model-0.1.5 vendor/plugins/haml/lib/sass/tree/comment_node.rb
radiant-0.7.2 vendor/plugins/haml/lib/sass/tree/comment_node.rb
radiant-0.8.2 vendor/plugins/haml/lib/sass/tree/comment_node.rb
radiant-rc-0.9.0 vendor/plugins/haml/lib/sass/tree/comment_node.rb
radiant-0.8.1 vendor/plugins/haml/lib/sass/tree/comment_node.rb
haml-2.0.10 lib/sass/tree/comment_node.rb
haml-1.8.0 lib/sass/tree/comment_node.rb
haml-1.8.1 lib/sass/tree/comment_node.rb
haml-2.0.1 lib/sass/tree/comment_node.rb
haml-2.0.3 lib/sass/tree/comment_node.rb
haml-2.0.6 lib/sass/tree/comment_node.rb
haml-2.0.8 lib/sass/tree/comment_node.rb