Sha256: 1a4dcf21ea18ad10395ee85b503f8aea8ba36a6057ababd5d5e26204c911108a

Contents?: true

Size: 482 Bytes

Versions: 6

Compression:

Stored size: 482 Bytes

Contents

command 'schema' do |c|
  c.syntax = "brief schema"
  c.description = "view information about the schema"

  c.option '--existing-models', 'Include all models, not just those that have documents'

  c.action do |args, options|
    schema_map = Brief.case(true).schema_map(!!!options.existing_models)

    output = if args.empty?
      schema_map.to_json
    else
      detail = schema_map.fetch(args.first.downcase, nil)
      detail.to_json if detail
    end

    output
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
brief-1.12.0 lib/brief/cli/schema.rb
brief-1.11.10 lib/brief/cli/schema.rb
brief-1.11.9 lib/brief/cli/schema.rb
brief-1.11.8 lib/brief/cli/schema.rb
brief-1.11.7 lib/brief/cli/schema.rb
brief-1.11.6 lib/brief/cli/schema.rb