lib/pennyworth/cli/actions/ruby_gems.rb in pennyworth-15.0.1 vs lib/pennyworth/cli/actions/ruby_gems.rb in pennyworth-15.0.2
- old
+ new
@@ -9,18 +9,20 @@
class RubyGems < Sod::Action
include Import[:kernel]
description "Render Alfred RubyGems script filter."
- on "--ruby_gems", argument: "[HANDLE]", default: Container[:configuration].ruby_gems_owner
+ on "--ruby_gems", argument: "[HANDLE]"
+ default { Container[:configuration].ruby_gems_owner }
+
def initialize(processor: Processor.for_gems, **)
super(**)
@processor = processor
end
- def call handle = default
- endpoint = "owners/#{handle}/gems.json"
+ def call handle = nil
+ endpoint = "owners/#{handle || default}/gems.json"
kernel.puts processor.call(endpoint).to_json
end
private