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
300 301 302 303 304 305 306 307 |
# File 'lib/ucode/cli.rb', line 300 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
295 296 297 |
# File 'lib/ucode/cli.rb', line 295 def list Commands::CacheCommand.new.list.each { |v| puts v } end |
#remove(version) ⇒ Object
310 311 312 313 |
# File 'lib/ucode/cli.rb', line 310 def remove(version) ok = Commands::CacheCommand.new.remove(version) puts(ok ? "Removed #{version}" : "#{version} not in cache") end |