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
227 228 229 230 231 232 233 234 |
# File 'lib/ucode/cli.rb', line 227 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
222 223 224 |
# File 'lib/ucode/cli.rb', line 222 def list Commands::CacheCommand.new.list.each { |v| puts v } end |
#remove(version) ⇒ Object
237 238 239 240 |
# File 'lib/ucode/cli.rb', line 237 def remove(version) ok = Commands::CacheCommand.new.remove(version) puts(ok ? "Removed #{version}" : "#{version} not in cache") end |