class Taketo::DestinationMatcher
Public Class Methods
new(nodes)
click to toggle source
# File lib/taketo/destination_matcher.rb, line 4 def initialize(nodes) @nodes = nodes end
Public Instance Methods
matches()
click to toggle source
# File lib/taketo/destination_matcher.rb, line 8 def matches (path_matches + global_alias_matches).uniq end
Private Instance Methods
global_alias_matches()
click to toggle source
# File lib/taketo/destination_matcher.rb, line 18 def global_alias_matches @nodes.select { |n| n.respond_to?(:global_alias) }.map(&:global_alias).map(&:to_s).reject(&:empty?) end
path_matches()
click to toggle source
# File lib/taketo/destination_matcher.rb, line 14 def path_matches @nodes.map(&:path) end