Class: LcpRuby::CLI::DocsCommand

Inherits:
Thor
  • Object
show all
Defined in:
lib/lcp_ruby/cli/docs_command.rb

Overview

‘lcp docs path` / `lcp docs copy DIR` — locate or copy the bundled curated docs. Rails-free; resolves the docs at the installed gem path so the content always matches the running gem version.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/lcp_ruby/cli/docs_command.rb', line 13

def self.exit_on_failure?
  true
end

Instance Method Details

#copy(dir) ⇒ Object



23
24
25
26
# File 'lib/lcp_ruby/cli/docs_command.rb', line 23

def copy(dir)
  copied = LcpRuby::AssetCopier.copy(LcpRuby::GemPaths.docs, dir)
  say "Copied #{copied.size} doc file(s) into #{File.expand_path(dir)}", :green
end

#pathObject



18
19
20
# File 'lib/lcp_ruby/cli/docs_command.rb', line 18

def path
  say LcpRuby::GemPaths.docs
end