lib/origen/pins/pin.rb
# Returns true if the pin has the given alias within the given or current context
Returns true if the pin has the given alias within the given or current context
Returns true if the pin has the given alias within the given or current context
def has_alias?(id, options = {})
        if aliases[id]
          if options[:ignore_context]
            true
          else
            packages = resolve_packages(options)
            modes = resolve_modes(options)
            configurations = resolve_configurations(options)
            begin
              aliases[id][:packages].include?(:all) || aliases[id][:packages].empty? ||
                packages.any? { |package| aliases[id][:packages].include?(package) }
            end && begin
              aliases[id][:modes].include?(:all) || aliases[id][:modes].empty? ||
                modes.any? { |mode| aliases[id][:modes].include?(mode) }
            end && begin
              aliases[id][:configurations].include?(:all) || aliases[id][:configurations].empty? ||
                configurations.any? { |config| aliases[id][:configurations].include?(config) }
            end
          end
        else
          false
        end
      end
def has_alias? ( id , options = { } ) if aliases [ id ] if options [ :ignore_context ] true else packages = resolve_packages ( options ) modes = resolve_modes ( options ) configurations = resolve_configurations ( options ) begin aliases [ id ] [ :packages ] . include? ( :all ) || aliases [ id ] [ :packages ] . empty? || packages . any? { | package | aliases [ id ] [ :packages ] . include? ( package ) } end && begin aliases [ id ] [ :modes ] . include? ( :all ) || aliases [ id ] [ :modes ] . empty? || modes . any? { | mode | aliases [ id ] [ :modes ] . include? ( mode ) } end && begin aliases [ id ] [ :configurations ] . include? ( :all ) || aliases [ id ] [ :configurations ] . empty? || configurations . any? { | config | aliases [ id ] [ :configurations ] . include? ( config ) } end end else false end end
Returns true if the pin has the given alias within the given or current context
Returns true if the pin has the given alias within the given or current context
id
<not_specific>
options
<not_specific>