Class: CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/tool-markdown/cli.rb

Overview

Command Line User Interface

Class Method Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *_args, &_block) ⇒ Object



27
28
29
# File 'lib/tool-markdown/cli.rb', line 27

def method_missing(method, *_args, &_block)
  link(method.to_s)
end

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/tool-markdown/cli.rb', line 35

def self.exit_on_failure?
  true
end

Instance Method Details



23
24
25
# File 'lib/tool-markdown/cli.rb', line 23

def link(dirname)
  Markdown.link(dirname, options)
end

#respond_to_missing?(_method_name) ⇒ Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/tool-markdown/cli.rb', line 31

def respond_to_missing?(_method_name)
  true
end

#versionObject



13
14
15
16
# File 'lib/tool-markdown/cli.rb', line 13

def version
  puts "#{Version::NAME} version #{Version::VERSION}"
  exit 0
end