Module: Chef::Sugar::Constraints
- Extended by:
- Constraints
- Included in:
- Constraints
- Defined in:
- lib/chef/sugar/constraints_dsl.rb,
lib/chef/sugar/constraints.rb
Overview
The Constraints DSL methods were broken out into this separate file to allow projects (such as Omnibus) to consume the Chef::Sugar::Constraints classes without the DSL methods stepping on existing methods of the same name.
Defined Under Namespace
Classes: Constraint, Version
Instance Method Summary collapse
-
#constraint(*constraints) ⇒ Chef::Sugar::Constraints::Constraint
Shortcut method for creating a new Constraint object.
-
#version(version) ⇒ Chef::Sugar::Constraints::Version
Shortcut method for creating a new Version object.
Instance Method Details
#constraint(*constraints) ⇒ Chef::Sugar::Constraints::Constraint
Shortcut method for creating a new Constraint object.
52 53 54 |
# File 'lib/chef/sugar/constraints_dsl.rb', line 52 def constraint(*constraints) Chef::Sugar::Constraints::Constraint.new(*constraints) end |
#version(version) ⇒ Chef::Sugar::Constraints::Version
Shortcut method for creating a new Version object.
39 40 41 |
# File 'lib/chef/sugar/constraints_dsl.rb', line 39 def version(version) Chef::Sugar::Constraints::Version.new(version) end |