class

CWE::View

Inherits Comparable < Reference < Object

A CWE View — a slice of the catalog organised around a stakeholder's perspective (Research, Development, Architecture, Hardware Design, …). Views are themselves CWE-numbered (CWE-1000, CWE-699, CWE-635, etc.).

Constructors

Instance methods

<=>(other : View) : Int32

The comparison operator. Returns 0 if the two objects are equal, a negative number if this object is considered less than other, a positive number if this object is considered greater than other, or nil if the two objects are not comparable.

Subclasses define this method to provide class-specific ordering.

The comparison operator is usually used to sort values:

# Sort in a descending way:
[3, 1, 2].sort { |x, y| y <=> x } # => [3, 2, 1]

# Sort in an ascending way:
[3, 1, 2].sort { |x, y| x <=> y } # => [1, 2, 3]
Source
==(other : View) : Bool

Compares this object to other based on the receiver’s <=> method, returning true if it returns 0.

Also returns true if this and other are the same object.

Source
audience
Source
content_history
Source
cwe_id
Source
filter
Source
hash(hasher)

See Object#hash(hasher)

Source
inspect(io : IO) : Nil

Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>
Source
mappable?
Source
mapping_notes
Source
mapping_usage
Source
member_ids
Source
members
Source
name
Source
notes
Source
objective
Source
raw_status
Source
status
Source
to_json(json : JSON::Builder) : Nil
Source
to_s(io : IO) : Nil

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>
Source
type

MITRE view types: "Graph", "Slice", "Explicit Slice", "Implicit Slice".

Source