Sha256: 0c78893deca04981ff4b443653b1d2b1319192d4854a0472d11e59fadd40dbd6
Contents?: true
Size: 730 Bytes
Versions: 3
Compression:
Stored size: 730 Bytes
Contents
# frozen_string_literal: true class CategoryDirector < KDirector::Directors::BaseDirector defaults(builder_type: CategoryBuilder, on_exist: :write, on_action: :execute) def category(name, description) builder.category(name, description) self end def generate generate_require_all_cmdlets self end def save_categories(**opts) cd(:builder_data) add('categories.json', content: builder.to_json, **opts) self end def osave_categories(**opts) save_categories(**{ open: true }.merge(opts)) end private def generate_require_all_cmdlets cd(:lib) add('_.rb', template_file: 'require_all_cmdlets.rb', cmdlets: data_access.cmdlet.all_cmdlets) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cmdlet-0.2.1 | .builders/director/category_director.rb |
cmdlet-0.2.0 | .builders/director/category_director.rb |
cmdlet-0.1.2 | .builders/director/category_director.rb |