class OSC::Reservations::Batch
Batch
server that utilizes reservations in the batch scheduler.
Attributes
server[R]
@return [String] the batch server to connect to.
Public Class Methods
new(server, context = {})
click to toggle source
@param server [String] The server to connect to. @param context [Hash] An optional hash of values that may be required by chosen adapter.
# File lib/osc/reservations/batch.rb, line 10 def initialize(server, context = {}) @server = server # symbolize keys @context = {} context.each do |key, value| @context[key.to_sym] = value end end
Public Instance Methods
method_missing(method_name, *arguments, &block)
click to toggle source
See if the method call exists as a key in @context.
@param method_name the method name called @param arguments the arguments to the call @param block an optional block for the call
Calls superclass method
# File lib/osc/reservations/batch.rb, line 25 def method_missing(method_name, *arguments, &block) @context.fetch(method_name) { super } end
respond_to_missing?(method_name, include_private = false)
click to toggle source
Checks if the method responds to an instance method, or is able to proxy it to @context.
@param method_name the method name to check @return [Boolean]
Calls superclass method
# File lib/osc/reservations/batch.rb, line 34 def respond_to_missing?(method_name, include_private = false) @context.include?(method_name) || super end