Class: Puppet::Pops::Adapters::SourcePosAdapter Deprecated
- Defined in:
- lib/puppet/pops/adapters.rb
Overview
Deprecated.
This class is for backward compatibility only. It’s not really an adapter but it is needed for the puppetlabs-strings gem
Class Method Summary collapse
Instance Method Summary collapse
- #extract_text ⇒ Object
- #file ⇒ Object
-
#initialize(object) ⇒ SourcePosAdapter
constructor
A new instance of SourcePosAdapter.
- #line ⇒ Object
- #pos ⇒ Object
Constructor Details
#initialize(object) ⇒ SourcePosAdapter
Returns a new instance of SourcePosAdapter.
32 33 34 |
# File 'lib/puppet/pops/adapters.rb', line 32 def initialize(object) @object = object end |
Class Method Details
.adapt(object) ⇒ Object
28 29 30 |
# File 'lib/puppet/pops/adapters.rb', line 28 def self.adapt(object) new(object) end |
Instance Method Details
#extract_text ⇒ Object
48 49 50 |
# File 'lib/puppet/pops/adapters.rb', line 48 def extract_text @object.locator.extract_text(@object.offset, @object.length) end |
#file ⇒ Object
36 37 38 |
# File 'lib/puppet/pops/adapters.rb', line 36 def file @object.file end |
#line ⇒ Object
40 41 42 |
# File 'lib/puppet/pops/adapters.rb', line 40 def line @object.line end |
#pos ⇒ Object
44 45 46 |
# File 'lib/puppet/pops/adapters.rb', line 44 def pos @object.pos end |