class Orbacle::CommandLineInterface::Options

Attributes

dir[R]
stats_file[R]

Public Class Methods

new() click to toggle source
# File lib/orbacle/command_line_interface.rb, line 14
def initialize
  @dir = Dir.pwd
  @stats_file = Pathname.new(Dir.pwd).join("stats.json")
end

Public Instance Methods

define_options(parser) click to toggle source
# File lib/orbacle/command_line_interface.rb, line 20
      def define_options(parser)
        parser.banner = <<~EOF
        Usage: orbaclerun [options] <command>

        Available commands:

          index
              test-run of the indexing on your project. You can use that command to check how long the project will be indexed and whether the indexing is successful.

          file-server
              starts the server working on standard IO. This is the command you want to setup in your editor with LSP plugin.

        Options:

        EOF

        parser.on('-d DIR', '--dir', 'Directory in which your project resides') do |dir|
          @dir = dir
        end

        parser.on("-h", "--help", "Prints this help") do
          puts parser
          exit
        end
      end