Class: GemfileLocker::CLI
- Inherits:
-
Thor
- Object
- Thor
- GemfileLocker::CLI
- Defined in:
- lib/gemfile_locker/cli.rb
Instance Method Summary collapse
Instance Method Details
#lock(*only) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/gemfile_locker/cli.rb', line 24 def lock(*only) gemfile = [:gemfile] lockfile = File.read("#{gemfile}.lock") processor_opts = only.any? ? .merge(only: only) : run_editor gemfile, Locker.new(lockfile, processor_opts) end |
#unlock(*only) ⇒ Object
36 37 38 39 |
# File 'lib/gemfile_locker/cli.rb', line 36 def unlock(*only) processor_opts = only.any? ? .merge(only: only) : run_editor [:gemfile], Unlocker.new(processor_opts) end |