Class: CmdbSite
- Inherits:
-
Object
- Object
- CmdbSite
- Defined in:
- lib/domain/site/model.rb
Instance Attribute Summary collapse
-
#application ⇒ Object
Returns the value of attribute application.
-
#business_unit ⇒ Object
Returns the value of attribute business_unit.
-
#country_code ⇒ Object
Returns the value of attribute country_code.
-
#name ⇒ Object
Returns the value of attribute name.
-
#sub_area ⇒ Object
Returns the value of attribute sub_area.
-
#utr ⇒ Object
Returns the value of attribute utr.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, country_code:, business_unit:, sub_area:, application:, utr:) ⇒ CmdbSite
constructor
A new instance of CmdbSite.
- #to_s ⇒ Object
Constructor Details
#initialize(name:, country_code:, business_unit:, sub_area:, application:, utr:) ⇒ CmdbSite
Returns a new instance of CmdbSite.
75 76 77 78 79 80 81 82 |
# File 'lib/domain/site/model.rb', line 75 def initialize(name:, country_code:, business_unit:, sub_area:, application:, utr:) @name = name @country_code = country_code @business_unit = business_unit @sub_area = sub_area @application = application @utr = utr end |
Instance Attribute Details
#application ⇒ Object
Returns the value of attribute application.
73 74 75 |
# File 'lib/domain/site/model.rb', line 73 def application @application end |
#business_unit ⇒ Object
Returns the value of attribute business_unit.
73 74 75 |
# File 'lib/domain/site/model.rb', line 73 def business_unit @business_unit end |
#country_code ⇒ Object
Returns the value of attribute country_code.
73 74 75 |
# File 'lib/domain/site/model.rb', line 73 def country_code @country_code end |
#name ⇒ Object
Returns the value of attribute name.
73 74 75 |
# File 'lib/domain/site/model.rb', line 73 def name @name end |
#sub_area ⇒ Object
Returns the value of attribute sub_area.
73 74 75 |
# File 'lib/domain/site/model.rb', line 73 def sub_area @sub_area end |
#utr ⇒ Object
Returns the value of attribute utr.
73 74 75 |
# File 'lib/domain/site/model.rb', line 73 def utr @utr end |
Class Method Details
.from_csv(row) ⇒ Object
84 85 86 87 88 89 90 91 92 93 |
# File 'lib/domain/site/model.rb', line 84 def self.from_csv(row) CmdbSite.new( name: row[:site], country_code: row[:country_code], business_unit: row[:business_unit], sub_area: row[:sub_area], application: row[:application], utr: row[:utr] ) end |
Instance Method Details
#to_s ⇒ Object
95 96 97 |
# File 'lib/domain/site/model.rb', line 95 def to_s [name, country_code, business_unit, sub_area, application, utr].join ',' end |