Sha256: 5ecaad3dda1b5988bee705d71673e6341b2caab3664ef074c0be1c1b7628220b

Contents?: true

Size: 826 Bytes

Versions: 31

Compression:

Stored size: 826 Bytes

Contents

# @Opulent
module Opulent
  # @Nodes
  module Nodes
    # @Text
    #
    # The text class will output raw or escaped HTML text
    #
    class Comment
      # Allow direct access to literal value and type
      attr_accessor :value, :visible, :parent, :indent, :name

      # Initialize literal instance variables
      #
      # @param value stores the literal's explicit value
      #
      def initialize(value = nil, parent = nil, indent = 0)
        @value = value
        @parent = parent
        @indent = indent
        @name = :comment
      end

      # Value evaluation method which returns the processed value of the
      # literal
      #
      def evaluate(context)
        comment = self.dup
        comment.value = context.evaluate "\"#{@value}\""
        
        return comment
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
opulent-1.5.5 .libold/opulent/nodes/comment.rb
opulent-1.5.4 .libold/opulent/nodes/comment.rb
opulent-1.5.3 .libold/opulent/nodes/comment.rb
opulent-1.5.2 .libold/opulent/nodes/comment.rb
opulent-1.5.1 .libold/opulent/nodes/comment.rb
opulent-1.5.0 .libold/opulent/nodes/comment.rb
opulent-1.4.8 .libold/opulent/nodes/comment.rb
opulent-1.4.7 .libold/opulent/nodes/comment.rb
opulent-1.4.6 .libold/opulent/nodes/comment.rb
opulent-1.4.5 .libold/opulent/nodes/comment.rb
opulent-1.4.3 .libold/opulent/nodes/comment.rb
opulent-1.4.2 .libold/opulent/nodes/comment.rb
opulent-1.4.1 .libold/opulent/nodes/comment.rb
opulent-1.4.0 .libold/opulent/nodes/comment.rb
opulent-1.3.3 .libold/opulent/nodes/comment.rb
opulent-1.3.2 .libold/opulent/nodes/comment.rb
opulent-1.3.1 .libold/opulent/nodes/comment.rb
opulent-1.3.0 .libold/opulent/nodes/comment.rb
opulent-1.2.1 .libold/opulent/nodes/comment.rb
opulent-1.2.0 .libold/opulent/nodes/comment.rb