Module: CompaniesHouseGateway::Checks::Check::ClassMethods
- Defined in:
- lib/companies_house_gateway/checks/check.rb
Instance Method Summary collapse
- #allowed_inputs ⇒ Object
-
#default_input(input) ⇒ Object
Add one or more default arguments.
-
#default_inputs ⇒ Object
Accessor for the check’s default arguments.
-
#required_input(*inputs) ⇒ Object
Add one or more required arguments.
-
#required_inputs ⇒ Object
Accessor for the check’s required arguments.
Instance Method Details
#allowed_inputs ⇒ Object
65 66 67 |
# File 'lib/companies_house_gateway/checks/check.rb', line 65 def allowed_inputs self.required_inputs.union(self.default_inputs.keys) end |
#default_input(input) ⇒ Object
Add one or more default arguments
56 57 58 |
# File 'lib/companies_house_gateway/checks/check.rb', line 56 def default_input(input) @default_inputs = input.merge(self.default_inputs) end |
#default_inputs ⇒ Object
Accessor for the check’s default arguments
61 62 63 |
# File 'lib/companies_house_gateway/checks/check.rb', line 61 def default_inputs @default_inputs ||= {} end |
#required_input(*inputs) ⇒ Object
Add one or more required arguments
46 47 48 |
# File 'lib/companies_house_gateway/checks/check.rb', line 46 def required_input(*inputs) @required_inputs = self.required_inputs.union(inputs) end |
#required_inputs ⇒ Object
Accessor for the check’s required arguments
51 52 53 |
# File 'lib/companies_house_gateway/checks/check.rb', line 51 def required_inputs @required_inputs ||= Set.new end |