Class: CreateCommand
Overview
Create directories ###########################
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
- #dirname ⇒ Object
- #dry_run ⇒ Object
-
#initialize(*args) ⇒ CreateCommand
constructor
A new instance of CreateCommand.
- #priority ⇒ Object
- #real_run ⇒ Object
Methods inherited from Command
Constructor Details
#initialize(*args) ⇒ CreateCommand
Returns a new instance of CreateCommand.
108 109 110 |
# File 'lib/commands.rb', line 108 def initialize *args (@dirname, @path)=args end |
Instance Method Details
#dirname ⇒ Object
112 |
# File 'lib/commands.rb', line 112 def dirname ; transform @dirname ; end |
#dry_run ⇒ Object
114 115 116 |
# File 'lib/commands.rb', line 114 def dry_run "mkdir #{dirname}" end |
#priority ⇒ Object
106 |
# File 'lib/commands.rb', line 106 def priority ; 1 ; end |
#real_run ⇒ Object
118 119 120 |
# File 'lib/commands.rb', line 118 def real_run FileUtils.mkdir_p dirname end |