class Protoboard::Circuit
This class represents a circuit.
Attributes
cool_off_after[R]
fallback[R]
method_name[R]
name[R]
on_after[R]
on_before[R]
open_after[R]
service[R]
Public Class Methods
new(**options)
click to toggle source
# File lib/protoboard/circuit.rb, line 12 def initialize(**options) @name = options.fetch(:name) @service = options.fetch(:service) @method_name = options.fetch(:method_name) @open_after = options.fetch(:open_after) @cool_off_after = options.fetch(:cool_off_after) @fallback = options[:fallback] @on_before = options.fetch(:on_before, []) @on_after = options.fetch(:on_after, []) @singleton_method = options.fetch(:singleton_method, false) rescue KeyError => error raise ArgumentError, "Missing required arguments: #{error.message}" end
Public Instance Methods
singleton_method?()
click to toggle source
# File lib/protoboard/circuit.rb, line 26 def singleton_method? @singleton_method end