Class: Unified2::Classification

Inherits:
Object
  • Object
show all
Defined in:
lib/unified2/classification.rb

Overview

Classification

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(classification = {}) ⇒ Classification

Initialize classification

Parameters:

  • classification (Hash) (defaults to: {})

    Classification attributes

Options Hash (classification):

  • :classification_id (Integer)

    Classification id

  • :name (String)

    Classification name

  • :short (String)

    Classification short name

  • :severity (String)

    Classification severity id



22
23
24
25
26
27
# File 'lib/unified2/classification.rb', line 22

def initialize(classification={})
  @id = classification[:classification_id]
  @name = classification[:name]
  @short = classification[:short]
  @severity = classification[:severity]
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



10
11
12
# File 'lib/unified2/classification.rb', line 10

def id
  @id
end

#nameObject

Returns the value of attribute name.



10
11
12
# File 'lib/unified2/classification.rb', line 10

def name
  @name
end

#severityObject

Returns the value of attribute severity.



10
11
12
# File 'lib/unified2/classification.rb', line 10

def severity
  @severity
end

#shortObject

Returns the value of attribute short.



10
11
12
# File 'lib/unified2/classification.rb', line 10

def short
  @short
end

Instance Method Details

#to_sString

String

Returns:



34
35
36
# File 'lib/unified2/classification.rb', line 34

def to_s
  @name
end