module Chef::Sugar::Constraints
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.
Public Instance Methods
constraint(*constraints)
click to toggle source
Shortcut method for creating a new {Constraint} object.
@param [String, Array
<String>] constraints
the list of constraints to use
@return [Chef::Sugar::Constraints::Constraint]
the new constraint object
# File lib/chef/sugar/constraints_dsl.rb, line 52 def constraint(*constraints) Chef::Sugar::Constraints::Constraint.new(*constraints) end
version(version)
click to toggle source
Shortcut method for creating a new {Version} object.
@param [String] version
the version (as a string) to create
@return [Chef::Sugar::Constraints::Version]
the new version object
# File lib/chef/sugar/constraints_dsl.rb, line 39 def version(version) Chef::Sugar::Constraints::Version.new(version) end