class RMonitor::Selector
Public Class Methods
new(options = {})
click to toggle source
# File lib/rmonitor/selector.rb, line 3 def initialize(options = {}) @profiles = options[:profiles] || Config.new.profiles @matcher = options[:matcher] || Matcher.new(options) end
Public Instance Methods
first_invokable()
click to toggle source
# File lib/rmonitor/selector.rb, line 8 def first_invokable @profiles.find do |profile| @matcher.invokable? profile end end