Class: PrePackager::ParamsAssertion
- Inherits:
-
Object
- Object
- PrePackager::ParamsAssertion
- Defined in:
- lib/pre-packager.rb
Instance Method Summary collapse
- #included?(opts) ⇒ Boolean
-
#initialize(*values) ⇒ ParamsAssertion
constructor
A new instance of ParamsAssertion.
Constructor Details
#initialize(*values) ⇒ ParamsAssertion
Returns a new instance of ParamsAssertion.
31 32 33 |
# File 'lib/pre-packager.rb', line 31 def initialize *values @values = values end |
Instance Method Details
#included?(opts) ⇒ Boolean
35 36 37 38 39 |
# File 'lib/pre-packager.rb', line 35 def included? opts @values.each do |v| raise ArgumentError.new "Should contain option: #{v}" unless opts.key? v end end |