Class: Puppet::Pops::Adapters::SourcePosAdapter Deprecated Private
- Defined in:
- lib/puppet/pops/adapters.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
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
- .adapt(object) ⇒ Object private
Instance Method Summary collapse
- #extract_text ⇒ Object private
- #file ⇒ Object private
-
#initialize(object) ⇒ SourcePosAdapter
constructor
private
A new instance of SourcePosAdapter.
- #line ⇒ Object private
- #pos ⇒ Object private
Constructor Details
#initialize(object) ⇒ SourcePosAdapter
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of SourcePosAdapter.
46 47 48 |
# File 'lib/puppet/pops/adapters.rb', line 46 def initialize(object) @object = object end |
Class Method Details
.adapt(object) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
42 43 44 |
# File 'lib/puppet/pops/adapters.rb', line 42 def self.adapt(object) new(object) end |
Instance Method Details
#extract_text ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
62 63 64 |
# File 'lib/puppet/pops/adapters.rb', line 62 def extract_text @object.locator.extract_text(@object.offset, @object.length) end |
#file ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
50 51 52 |
# File 'lib/puppet/pops/adapters.rb', line 50 def file @object.file end |
#line ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
54 55 56 |
# File 'lib/puppet/pops/adapters.rb', line 54 def line @object.line end |
#pos ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
58 59 60 |
# File 'lib/puppet/pops/adapters.rb', line 58 def pos @object.pos end |