class Proc
Adding a method `perform` for each block so that we can write nice callbacks for this client
Public Instance Methods
perform(callable, result)
click to toggle source
# File lib/hawkular/operations/operations_api.rb 14 def perform(callable, result) 15 call(Class.new do 16 method_name = callable.to_sym 17 define_method(method_name) { |&block| block.nil? ? true : block.call(result) } 18 define_method("#{method_name}?") { true } 19 define_method(:method_missing) { |*| PerformMethodMissing } 20 end.new) 21 end