Module: Puppet::Pops::Types::TenseVariants Deprecated Private

Defined in:
lib/puppet/pops/types/type_mismatch_describer.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Deprecated.

Will be removed in Puppet 5

Module to handle present/past tense.

All method names prefixed with “it_” to avoid conflict with Mocha expectations. Adding a method named ‘expects’ just doesn’t work.

Instance Method Summary collapse

Instance Method Details

#it_does_not_expect(tense) ⇒ 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.



112
113
114
115
116
117
118
119
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 112

def it_does_not_expect(tense)
  case tense
  when :present
    'does not expect'
  else
    'did not expect'
  end
end

#it_expects(tense) ⇒ 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.



103
104
105
106
107
108
109
110
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 103

def it_expects(tense)
  case tense
  when :present
    'expects'
  else
    'expected'
  end
end

#it_has_no(tense) ⇒ 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.



121
122
123
124
125
126
127
128
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 121

def it_has_no(tense)
  case tense
  when :present
    'has no'
  else
    'did not have a'
  end
end

#it_references(tense) ⇒ 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.



130
131
132
133
134
135
136
137
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 130

def it_references(tense)
  case tense
    when :present
      'references'
    else
      'referenced'
  end
end