Sha256: 505f133603195d55f5844e36fdbb697f453f8f3dfbdf903a125d8f023dd387ef
Contents?: true
Size: 1.29 KB
Versions: 15
Compression:
Stored size: 1.29 KB
Contents
command "view example" do |c| c.syntax = "brief view example MODEL" c.description = "View an example document" c.option '--format TYPE', String, 'Which format to present the information. json, or table' c.action do |args, options| options.default(format: 'editor') model = args.first briefcase = Brief.case = Brief::Briefcase.new(root: Pathname(options.root || Brief.pwd)) schema_map = briefcase.schema_map(false) payload = schema_map if args.length > 0 payload = schema_map.fetch(args.first) do raise "Invalid model." end end puts "Viewing Documentation for #{ payload }" end end command "view documentation" do |c| c.syntax = "brief view documentation for MODEL" c.description = "View the documentation for a model" c.option '--format TYPE', String, 'Which format to present the information. json, or table' c.action do |args, options| options.default(format: 'editor') model = args.first briefcase = Brief.case = Brief::Briefcase.new(root: Pathname(options.root || Brief.pwd)) schema_map = briefcase.schema_map(false) payload = schema_map if args.length > 0 payload = schema_map.fetch(args.first) do raise "Invalid model." end end puts "Viewing Documentation for #{ payload }" end end
Version data entries
15 entries across 15 versions & 1 rubygems