Class: Gemsmith::Skeletons::CLISkeleton
- Inherits:
-
BaseSkeleton
- Object
- BaseSkeleton
- Gemsmith::Skeletons::CLISkeleton
- Defined in:
- lib/gemsmith/skeletons/cli_skeleton.rb
Overview
Configures Command Line Interface (CLI) support.
Instance Method Summary collapse
Methods inherited from BaseSkeleton
Constructor Details
This class inherits a constructor from Gemsmith::Skeletons::BaseSkeleton
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 |
# File 'lib/gemsmith/skeletons/cli_skeleton.rb', line 9 def create return unless enabled? cli.template "%gem_name%/bin/%gem_name%.tt", cli. cli.template "%gem_name%/lib/%gem_name%/cli.rb.tt", cli. end |
#enabled? ⇒ Boolean
5 6 7 |
# File 'lib/gemsmith/skeletons/cli_skeleton.rb', line 5 def enabled? cli..key?(:bin) && cli.[:bin] end |