Class: Dmcli::CLI
- Inherits:
-
Thor
- Object
- Thor
- Dmcli::CLI
- Defined in:
- lib/dmcli/cli.rb
Overview
CLI Command-line options and commands are set in the CLI class
Instance Method Summary collapse
Instance Method Details
#monsters ⇒ Object
27 28 29 |
# File 'lib/dmcli/cli.rb', line 27 def monsters puts "Not implemented" end |
#package ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/dmcli/cli.rb', line 34 def package xml = XmlExporter.new output = .output? ? .output : "output.xml" filepath = .filepath? ? .filepath : "." xml.builder(filepath, output) end |
#spells ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/dmcli/cli.rb', line 15 def spells caster = .caster? ? .caster : "any" level = .level? ? .level : "any" @filepath = .filepath? ? .filepath : "." loader = DndDataLoader.new puts loader.load_spells(@filepath, "BECMI", caster, level) end |
#version ⇒ Object
43 44 45 |
# File 'lib/dmcli/cli.rb', line 43 def version puts "dmcli version #{VERSION}" end |