Class: Cb::CbCategory
- Inherits:
-
Object
- Object
- Cb::CbCategory
- Defined in:
- lib/cb/models/cb_category.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#language ⇒ Object
Returns the value of attribute language.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #CategoryCode ⇒ Object
- #CategoryLanguage ⇒ Object
- #CategoryName ⇒ Object
-
#initialize(args = {}) ⇒ CbCategory
constructor
A new instance of CbCategory.
Constructor Details
#initialize(args = {}) ⇒ CbCategory
4 5 6 7 8 |
# File 'lib/cb/models/cb_category.rb', line 4 def initialize(args={}) @code = args["Code"] || "" @name = args["Name"]["#text"] || "" @language = args["Name"]["@language"] || "" end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
3 4 5 |
# File 'lib/cb/models/cb_category.rb', line 3 def code @code end |
#language ⇒ Object
Returns the value of attribute language.
3 4 5 |
# File 'lib/cb/models/cb_category.rb', line 3 def language @language end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/cb/models/cb_category.rb', line 3 def name @name end |
Instance Method Details
#CategoryCode ⇒ Object
14 15 16 |
# File 'lib/cb/models/cb_category.rb', line 14 def CategoryCode() return @code if @code.present? end |
#CategoryLanguage ⇒ Object
18 19 20 |
# File 'lib/cb/models/cb_category.rb', line 18 def CategoryLanguage() return @language if @language.present? end |
#CategoryName ⇒ Object
10 11 12 |
# File 'lib/cb/models/cb_category.rb', line 10 def CategoryName() return @name if @name.present? end |