Class: ApiBlueprint::Runner
- Inherits:
-
Object
- Object
- ApiBlueprint::Runner
- Extended by:
- Dry::Initializer
- Defined in:
- lib/api-blueprint/runner.rb
Instance Method Summary collapse
Instance Method Details
#run(item, cache_options = {}) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/api-blueprint/runner.rb', line 8 def run(item, = {}) if item.is_a?(Blueprint) run_blueprint item, elsif item.is_a?(Collection) run_collection item, else raise ArgumentError, "expected a blueprint or blueprint collection, got #{item.class}" end end |
#runner_options ⇒ Object
18 19 20 |
# File 'lib/api-blueprint/runner.rb', line 18 def { headers: headers, cache: cache } end |