Class: CmdbEos

Inherits:
Domain::Model show all
Defined in:
lib/domain/software/model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::Model

columns, from_csv, from_json, headers, #initialize, primary_key, table_name, #to_csv, #to_hash, #to_s, view

Constructor Details

This class inherits a constructor from Domain::Model

Instance Attribute Details

#end_of_extended_support_dateObject

Returns the value of attribute end_of_extended_support_date.



27
28
29
# File 'lib/domain/software/model.rb', line 27

def end_of_extended_support_date
  @end_of_extended_support_date
end

#end_of_life_dateObject

Returns the value of attribute end_of_life_date.



27
28
29
# File 'lib/domain/software/model.rb', line 27

def end_of_life_date
  @end_of_life_date
end

#end_of_support_dateObject

Returns the value of attribute end_of_support_date.



27
28
29
# File 'lib/domain/software/model.rb', line 27

def end_of_support_date
  @end_of_support_date
end

#manufacturerObject

Returns the value of attribute manufacturer.



27
28
29
# File 'lib/domain/software/model.rb', line 27

def manufacturer
  @manufacturer
end

#no_dates_reasonObject

Returns the value of attribute no_dates_reason.



27
28
29
# File 'lib/domain/software/model.rb', line 27

def no_dates_reason
  @no_dates_reason
end

#product_categorization_tier_1Object

Returns the value of attribute product_categorization_tier_1.



27
28
29
# File 'lib/domain/software/model.rb', line 27

def product_categorization_tier_1
  @product_categorization_tier_1
end

#product_categorization_tier_2Object

Returns the value of attribute product_categorization_tier_2.



27
28
29
# File 'lib/domain/software/model.rb', line 27

def product_categorization_tier_2
  @product_categorization_tier_2
end

#product_categorization_tier_3Object

Returns the value of attribute product_categorization_tier_3.



27
28
29
# File 'lib/domain/software/model.rb', line 27

def product_categorization_tier_3
  @product_categorization_tier_3
end

#product_idObject

Returns the value of attribute product_id.



27
28
29
# File 'lib/domain/software/model.rb', line 27

def product_id
  @product_id
end

#product_nameObject

Returns the value of attribute product_name.



27
28
29
# File 'lib/domain/software/model.rb', line 27

def product_name
  @product_name
end

Instance Method Details

#split_product_name(product_name) ⇒ Object



38
39
40
41
42
43
44
45
# File 'lib/domain/software/model.rb', line 38

def split_product_name(product_name)
  match = product_name.match(/^(.*?)(?:\s+Database Server)?(?:\s+v?(\d+\.\d+|\d+))?$/i)
  return product_name, nil unless match

  name = match[1].strip
  version = match[2]
  [name, version]
end