class Shamu::Features::Conditions::Hosts
Match against the current host machine's name.
Public Instance Methods
match?( context )
click to toggle source
(see Condition#match?
)
# File lib/shamu/features/conditions/hosts.rb, line 9 def match?( context ) hosts.any? { |h| h.match( context.host ) } end
Private Instance Methods
hosts()
click to toggle source
# File lib/shamu/features/conditions/hosts.rb, line 15 def hosts @hosts ||= Array( config ).map do |entry| Regexp.new( entry, true ) end end