Class: CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/ruby-zen/cli.rb

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



38
39
40
# File 'lib/ruby-zen/cli.rb', line 38

def method_missing(method, *_args, &_block)
  puts "[ERROR] #{method} unknown!"
end

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


46
47
48
49
# File 'lib/ruby-zen/cli.rb', line 46

def self.exit_on_failure?
  # Thor stop and show messages on screen on failure
  true
end

Instance Method Details

#langsObject



22
23
24
# File 'lib/ruby-zen/cli.rb', line 22

def langs
  RubyZen.langs
end

#respond_to_missing?(_method_name) ⇒ Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/ruby-zen/cli.rb', line 42

def respond_to_missing?(_method_name)
  true
end

#showObject



34
35
36
# File 'lib/ruby-zen/cli.rb', line 34

def show
  RubyZen.show(options)
end

#versionObject



13
14
15
# File 'lib/ruby-zen/cli.rb', line 13

def version
  RubyZen.version
end