Class: Ucode::Cli::Cache
- Inherits:
-
Thor
- Object
- Thor
- Ucode::Cli::Cache
- Defined in:
- lib/ucode/cli.rb
Overview
─────────────── cache ───────────────
Instance Method Summary collapse
Instance Method Details
#info(version) ⇒ Object
326 327 328 329 330 331 332 333 |
# File 'lib/ucode/cli.rb', line 326 def info(version) result = Commands::CacheCommand.new.info(version) if result.nil? puts "Nothing cached for #{version}" else puts JSON.pretty_generate(result.to_h) end end |
#list ⇒ Object
321 322 323 |
# File 'lib/ucode/cli.rb', line 321 def list Commands::CacheCommand.new.list.each { |v| puts v } end |
#remove(version) ⇒ Object
336 337 338 339 |
# File 'lib/ucode/cli.rb', line 336 def remove(version) ok = Commands::CacheCommand.new.remove(version) puts(ok ? "Removed #{version}" : "#{version} not in cache") end |