lib/judges/options.rb in judges-0.10.0 vs lib/judges/options.rb in judges-0.11.0

- old
+ new

@@ -18,10 +18,11 @@ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +require 'others' require_relative '../judges' # Options for Ruby scripts in the judges. # Author:: Yegor Bugayenko (yegor256@gmail.com) # Copyright:: Copyright (c) 2024 Yegor Bugayenko @@ -52,11 +53,11 @@ "#{k} → \"#{v}\"" end.join("\n") end # Get option by name. - def method_missing(*args) + others do |*args| @hash ||= begin pp = @pairs || [] pp = @pairs.map { |k, v| "#{k}=#{v}" } if pp.is_a?(Hash) pp = pp.split(',') if pp.is_a?(String) pp.compact! @@ -69,17 +70,7 @@ [k.to_sym, v.match?(/^[0-9]+$/) ? v.to_i : v] end end k = args[0].downcase @hash[k] - end - - # rubocop:disable Style/OptionalBooleanParameter - def respond_to?(_method, _include_private = false) - # rubocop:enable Style/OptionalBooleanParameter - true - end - - def respond_to_missing?(_method, _include_private = false) - true end end