Class: Slop::PathOption
- Inherits:
-
Option
- Object
- Option
- Slop::PathOption
- Defined in:
- lib/shell_helpers/options.rb
Instance Method Summary collapse
Instance Method Details
#call(value) ⇒ Object
12 13 14 |
# File 'lib/shell_helpers/options.rb', line 12 def call(value) ShellHelpers::Pathname.new(value) end |
#finish(opts) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/shell_helpers/options.rb', line 15 def finish(opts) if opts[:verbose] and opts[:test] pathname=ShellHelpers::Pathname::DryRun elsif opts[:verbose] and !opts[:test] pathname=ShellHelpers::Pathname::Verbose elsif opts[:test] pathname=ShellHelpers::Pathname::NoWrite else pathname=ShellHelpers::Pathname end self.value=pathname.new(value) end |