# class Puppet::Parser::AST::Leaf

The base class for all of the leaves of the parse trees. These basically just have types and values. Both of these parameters are simple values, not AST objects.

### Attributes

type[RW]
value[RW]

### Public Instance Methods

evaluate(scope) click to toggle source

Return our value.

    # File lib/puppet/parser/ast/leaf.rb, line 9
    def evaluate(scope)
      @value
    end

match(value) click to toggle source

    # File lib/puppet/parser/ast/leaf.rb, line 13
    def match(value)
      @value == value
    end

to_s() click to toggle source

    # File lib/puppet/parser/ast/leaf.rb, line 17
    def to_s
      @value.to_s unless @value.nil?
    end