Class Uttk::Logger::Segment
In: lib/uttk/logger/path.rb
Parent: Object

Methods

Attributes

options  [RW] 
segment  [RW] 

Public Class methods

[Source]

# File lib/uttk/logger/path.rb, line 14
      def initialize ( segment, options=nil )
        raise if segment.is_a? Segment
        @segment, @options = segment, (options || {})
      end

[Source]

# File lib/uttk/logger/path.rb, line 24
      def self.quote ( s )
        s.gsub(/(?:([\/\]\[])|\\(.))/, '\\\\\1\2')
      end

Public Instance methods

[Source]

# File lib/uttk/logger/path.rb, line 21
      def == ( rhs )
        rhs.is_a?(self.class) && @segment == rhs.segment && @options == rhs.options
      end

[Source]

# File lib/uttk/logger/path.rb, line 18
      def initialize_copy ( rhs )
        @segment, @options = rhs.segment.try_dup, rhs.options.dup
      end

[Source]

# File lib/uttk/logger/path.rb, line 27
      def quoted_segment
        Segment.quote(@segment.to_s)
      end

[Source]

# File lib/uttk/logger/path.rb, line 30
      def regexp_quoted_segment
        Segment.quote(Regexp.quote(@segment.to_s))
      end

[Validate]