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
185 186 187 188 189 190 191 192 |
# File 'lib/ucode/cli.rb', line 185 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
180 181 182 |
# File 'lib/ucode/cli.rb', line 180 def list Commands::CacheCommand.new.list.each { |v| puts v } end |
#remove(version) ⇒ Object
195 196 197 198 |
# File 'lib/ucode/cli.rb', line 195 def remove(version) ok = Commands::CacheCommand.new.remove(version) puts(ok ? "Removed #{version}" : "#{version} not in cache") end |