Class: Harnex::Guide

Inherits:
Object
  • Object
show all
Defined in:
lib/harnex/commands/guide.rb

Constant Summary collapse

GUIDE_PATH =
File.expand_path("../../../../GUIDE.md", __FILE__)

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.usageObject



5
6
7
8
9
10
11
# File 'lib/harnex/commands/guide.rb', line 5

def self.usage
  <<~TEXT
    Usage: harnex guide

    Print the getting started guide.
  TEXT
end

Instance Method Details

#runObject



13
14
15
16
17
18
19
20
21
# File 'lib/harnex/commands/guide.rb', line 13

def run
  unless File.exist?(GUIDE_PATH)
    warn("harnex guide: GUIDE.md not found at #{GUIDE_PATH}")
    return 1
  end

  puts File.read(GUIDE_PATH)
  0
end