Class: Orbacle::CommandLineInterface::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/orbacle/command_line_interface.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOptions

Returns a new instance of Options.



14
15
16
17
# File 'lib/orbacle/command_line_interface.rb', line 14

def initialize
  @dir = Dir.pwd
  @stats_file = Pathname.new(Dir.pwd).join("stats.json")
end

Instance Attribute Details

#dirObject (readonly)

Returns the value of attribute dir.



18
19
20
# File 'lib/orbacle/command_line_interface.rb', line 18

def dir
  @dir
end

#stats_fileObject (readonly)

Returns the value of attribute stats_file.



18
19
20
# File 'lib/orbacle/command_line_interface.rb', line 18

def stats_file
  @stats_file
end

Instance Method Details

#define_options(parser) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/orbacle/command_line_interface.rb', line 20

def define_options(parser)
  parser.banner = "  Usage: orbaclerun [options] <command>\n\n  Available commands:\n\n    index\n        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.\n\n    file-server\n        starts the server working on standard IO. This is the command you want to setup in your editor with LSP plugin.\n\n  Options:\n\n  EOF\n\n  parser.on('-d DIR', '--dir', 'Directory in which your project resides') do |dir|\n    @dir = dir\n  end\n\n  parser.on(\"-h\", \"--help\", \"Prints this help\") do\n    puts parser\n    exit\n  end\nend\n"