Class: Tex2id::CLI
- Inherits:
-
Object
- Object
- Tex2id::CLI
- Defined in:
- lib/tex2id/cli.rb
Instance Attribute Summary collapse
-
#argv ⇒ Object
readonly
Returns the value of attribute argv.
-
#output_file ⇒ Object
readonly
Returns the value of attribute output_file.
-
#source_file ⇒ Object
readonly
Returns the value of attribute source_file.
Class Method Summary collapse
Instance Method Summary collapse
- #help(io) ⇒ Object
-
#initialize(argv) ⇒ CLI
constructor
A new instance of CLI.
- #run ⇒ Object
Constructor Details
#initialize(argv) ⇒ CLI
Returns a new instance of CLI.
9 10 11 12 |
# File 'lib/tex2id/cli.rb', line 9 def initialize(argv) @argv = argv end |
Instance Attribute Details
#argv ⇒ Object (readonly)
Returns the value of attribute argv.
14 15 16 |
# File 'lib/tex2id/cli.rb', line 14 def argv @argv end |
#output_file ⇒ Object (readonly)
Returns the value of attribute output_file.
14 15 16 |
# File 'lib/tex2id/cli.rb', line 14 def output_file @output_file end |
#source_file ⇒ Object (readonly)
Returns the value of attribute source_file.
14 15 16 |
# File 'lib/tex2id/cli.rb', line 14 def source_file @source_file end |
Class Method Details
.run(argv) ⇒ Object
5 6 7 |
# File 'lib/tex2id/cli.rb', line 5 def self.run(argv) self.new(argv).run end |
Instance Method Details
#help(io) ⇒ Object
29 30 31 32 33 |
# File 'lib/tex2id/cli.rb', line 29 def help(io) io.puts <<-END_HELP Usage: #{$0} <source_file> [<output_file>] END_HELP end |