Sha256: f8746d04402b50bc6c83d0fdcf44c4513d25d1dfb0b3468a4bc2e79aa0320b45

Contents?: true

Size: 479 Bytes

Versions: 9

Compression:

Stored size: 479 Bytes

Contents

require "thor"

module Expressir
  class Cli < Thor
    desc "format PATH", "pretty print EXPRESS schema located at PATH"
    def format(path)
      repository = Expressir::Express::Parser.from_file(path)
      repository.schemas.each do |schema|
        puts "\n(* Expressir formatted schema: #{schema.id} *)\n"
        puts schema.to_s(no_remarks: true)
      end
    end

    desc "version", "Expressir Version"
    def version
      say(Expressir::VERSION)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
expressir-1.4.0 lib/expressir/cli.rb
expressir-1.4.0-x86_64-linux-musl lib/expressir/cli.rb
expressir-1.4.0-x86_64-linux-gnu lib/expressir/cli.rb
expressir-1.4.0-x86_64-darwin lib/expressir/cli.rb
expressir-1.4.0-x64-mingw32 lib/expressir/cli.rb
expressir-1.4.0-x64-mingw-ucrt lib/expressir/cli.rb
expressir-1.4.0-arm64-darwin lib/expressir/cli.rb
expressir-1.4.0-aarch64-linux-musl lib/expressir/cli.rb
expressir-1.4.0-aarch64-linux-gnu lib/expressir/cli.rb