Sha256: 0decd9c6b388f20b039ec8a9eb00a4999fb82d9c69094ae6251fcc916a994bfe

Contents?: true

Size: 480 Bytes

Versions: 30

Compression:

Stored size: 480 Bytes

Contents

# frozen_string_literal: true

class CategoryBuilder < KDirector::Builders::ActionsBuilder
  def category(name, description)
    value = {
      name: name,
      description: description
    }

    add(:categories, value: value)

    self
  end

  def save_categories(**opts)
    k_builder
      .cd(:builder_data)
      .add('categories.json', content: to_json, **opts)

    self
  end

  def osave_categories(**opts)
    save_categories(**{ open: true }.merge(opts))
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
cmdlet-0.14.0 .builders/director/category_builder.rb
cmdlet-0.13.2 .builders/director/category_builder.rb
cmdlet-0.13.1 .builders/director/category_builder.rb
cmdlet-0.13.0 .builders/director/category_builder.rb
cmdlet-0.12.5 .builders/director/category_builder.rb
cmdlet-0.12.4 .builders/director/category_builder.rb
cmdlet-0.12.3 .builders/director/category_builder.rb
cmdlet-0.12.2 .builders/director/category_builder.rb
cmdlet-0.12.1 .builders/director/category_builder.rb
cmdlet-0.12.0 .builders/director/category_builder.rb
cmdlet-0.11.0 .builders/director/category_builder.rb
cmdlet-0.10.1 .builders/director/category_builder.rb
cmdlet-0.10.0 .builders/director/category_builder.rb
cmdlet-0.9.2 .builders/director/category_builder.rb
cmdlet-0.9.1 .builders/director/category_builder.rb
cmdlet-0.9.0 .builders/director/category_builder.rb
cmdlet-0.8.0 .builders/director/category_builder.rb
cmdlet-0.7.1 .builders/director/category_builder.rb
cmdlet-0.7.0 .builders/director/category_builder.rb
cmdlet-0.6.2 .builders/director/category_builder.rb