Class: Puppet::Pops::Binder::BindingsLabelProvider Private

Inherits:
Object
  • Object
show all
Includes:
LabelProvider
Defined in:
lib/puppet/pops/binder/bindings_label_provider.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.

A provider of labels for bindings model object, producing a human name for the model object.

Constant Summary

Constants included from LabelProvider

LabelProvider::A, LabelProvider::AN, LabelProvider::SKIPPED_CHARACTERS, LabelProvider::VOWELS

Instance Method Summary collapse

Methods included from LabelProvider

#a_an, #a_an_uc, #plural_s, #the, #the_uc

Constructor Details

#initializeBindingsLabelProvider

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 BindingsLabelProvider.



7
8
9
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 7

def initialize
  @@label_visitor ||= Puppet::Pops::Visitor.new(self,"label",0,0)
end

Instance Method Details

#label(o) ⇒ String

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.

Produces a label for the given object without article.

Returns:

  • (String)

    a human readable label



14
15
16
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 14

def label o
 @@label_visitor.visit_this_0(self, o)
end

#label_ArrayMultibindProducerDescriptor(o) ⇒ 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.



29
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 29

def label_ArrayMultibindProducerDescriptor o  ; "Array Multibind Producer"                     end

#label_Binding(o) ⇒ 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.



38
39
40
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 38

def label_Binding(o)
  'Binding' + (o.multibind_id.nil? ? '' : ' In Multibind')
end

#label_Bindings(o) ⇒ 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.



31
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 31

def label_Bindings o                          ; "Bindings"                                     end

#label_ConstantProducerDescriptor(o) ⇒ 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.



21
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 21

def label_ConstantProducerDescriptor o        ; "Producer['#{o.value}']"                       end

#label_ContributedBindings(o) ⇒ 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.



35
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 35

def label_ContributedBindings o               ; "Contributed Bindings"                         end

#label_EvaluatingProducerDescriptor(o) ⇒ 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.



22
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 22

def label_EvaluatingProducerDescriptor o      ; "Evaluating Producer"                          end

#label_FirstFoundProducerDescriptor(o) ⇒ 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.



26
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 26

def label_FirstFoundProducerDescriptor o      ; "First Found Producer"                         end

#label_HashLookupProducerDescriptor(o) ⇒ 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.



25
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 25

def label_HashLookupProducerDescriptor o      ; "Hash Lookup Producer[#{o.name}][#{o.key}]"    end

#label_HashMultibindProducerDescriptor(o) ⇒ 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.



30
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 30

def label_HashMultibindProducerDescriptor o   ; "Hash Multibind Producer"                      end

#label_InstanceProducerDescriptor(o) ⇒ 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.



23
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 23

def label_InstanceProducerDescriptor o        ; "Producer[#{o.class_name}]"                    end

#label_LayeredBindings(o) ⇒ 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.



33
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 33

def label_LayeredBindings o                   ; "Layered Bindings"                             end

#label_LookupProducerDescriptor(o) ⇒ 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.



24
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 24

def label_LookupProducerDescriptor o          ; "Lookup Producer[#{o.name}]"                   end

#label_Multibinding(o) ⇒ 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.



41
42
43
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 41

def label_Multibinding(o)
  'Multibinding' + (o.multibind_id.nil? ? '' : ' In Multibind')
end

#label_MultibindProducerDescriptor(o) ⇒ 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.



28
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 28

def label_MultibindProducerDescriptor o       ; "Multibind Producer"                           end

#label_NamedArgument(o) ⇒ 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.



36
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 36

def label_NamedArgument o                     ; "Named Argument"                               end

#label_NamedBindings(o) ⇒ 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.



32
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 32

def label_NamedBindings o                     ; "Named Bindings"                               end

#label_NamedLayer(o) ⇒ 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.



34
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 34

def label_NamedLayer o                        ; "Layer '#{o.name}'"                            end

#label_NonCachingProducerDescriptor(o) ⇒ 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.



20
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 20

def label_NonCachingProducerDescriptor o      ; "Non Caching Producer"                         end

#label_PAnyType(o) ⇒ 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.



18
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 18

def label_PAnyType o                          ; "#{Puppet::Pops::Types::TypeFactory.label(o)}" end

#label_ProducerDescriptor(o) ⇒ 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.



19
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 19

def label_ProducerDescriptor o                ; "Producer"                                     end

#label_ProducerProducerDescriptor(o) ⇒ 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.



27
# File 'lib/puppet/pops/binder/bindings_label_provider.rb', line 27

def label_ProducerProducerDescriptor o        ; "Producer[Producer]"                           end