Sha256: b43d43ddea65f43b419042931ec36d21896f7940d9fc17f8014475d8696b7d00

Contents?: true

Size: 508 Bytes

Versions: 20

Compression:

Stored size: 508 Bytes

Contents

# frozen_string_literal: true
# Interface for something that is "locatable" (holds offset and length).
class Puppet::Pops::Parser::Locatable

  # The offset in the locator's content
  def offset
  end

  # The length in the locator from the given offset
  def length
  end

  # This class is useful for testing
  class Fixed < Puppet::Pops::Parser::Locatable
    attr_reader :offset
    attr_reader :length

    def initialize(offset, length)
      @offset = offset
      @length = length
    end
  end

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
puppet-8.3.0 lib/puppet/pops/parser/locatable.rb
puppet-8.3.0-x86-mingw32 lib/puppet/pops/parser/locatable.rb
puppet-8.3.0-x64-mingw32 lib/puppet/pops/parser/locatable.rb
puppet-8.3.0-universal-darwin lib/puppet/pops/parser/locatable.rb
puppet-8.3.1 lib/puppet/pops/parser/locatable.rb
puppet-8.3.1-x86-mingw32 lib/puppet/pops/parser/locatable.rb
puppet-8.3.1-x64-mingw32 lib/puppet/pops/parser/locatable.rb
puppet-8.3.1-universal-darwin lib/puppet/pops/parser/locatable.rb
puppet-8.2.0 lib/puppet/pops/parser/locatable.rb
puppet-8.2.0-x86-mingw32 lib/puppet/pops/parser/locatable.rb
puppet-8.2.0-x64-mingw32 lib/puppet/pops/parser/locatable.rb
puppet-8.2.0-universal-darwin lib/puppet/pops/parser/locatable.rb
puppet-8.1.0 lib/puppet/pops/parser/locatable.rb
puppet-8.1.0-x86-mingw32 lib/puppet/pops/parser/locatable.rb
puppet-8.1.0-x64-mingw32 lib/puppet/pops/parser/locatable.rb
puppet-8.1.0-universal-darwin lib/puppet/pops/parser/locatable.rb
puppet-8.0.1 lib/puppet/pops/parser/locatable.rb
puppet-8.0.1-x86-mingw32 lib/puppet/pops/parser/locatable.rb
puppet-8.0.1-x64-mingw32 lib/puppet/pops/parser/locatable.rb
puppet-8.0.1-universal-darwin lib/puppet/pops/parser/locatable.rb