Sha256: 7eaae24967ef85d3d05bc927c5679c31df6f8d62d137302cacc352af06ca9b24
Contents?: true
Size: 370 Bytes
Versions: 4
Compression:
Stored size: 370 Bytes
Contents
# frozen_string_literal: true require "yaml" module RailsInteractive class CLI # Categories class for the interactive CLI module class Category def initialize @categories = YAML.load_file("#{__dir__}/config/categories.yml").uniq end def all @categories.sort_by { |category| category["weight"] } end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rails-interactive-2.1.3 | lib/cli/category.rb |
rails-interactive-2.1.2 | lib/cli/category.rb |
rails-interactive-2.1.1 | lib/cli/category.rb |
rails-interactive-2.1.0 | lib/cli/category.rb |