Class: Asset
- Inherits:
-
Object
- Object
- Asset
- Defined in:
- lib/api/utils/asset.rb
Overview
This class is used to create an Asset object
Instance Attribute Summary collapse
-
#asset_name ⇒ Object
readonly
Returns the value of attribute asset_name.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#localized_names ⇒ Object
readonly
Returns the value of attribute localized_names.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(data, type) ⇒ Asset
constructor
A new instance of Asset.
Constructor Details
#initialize(data, type) ⇒ Asset
Returns a new instance of Asset.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/api/utils/asset.rb', line 7 def initialize(data, type) @data = data @type = type @name = @data['name'] @id = @data['id'] @asset_name = @data['assetName'] fetch_localized_names remove_instance_variable(:@data) end |
Instance Attribute Details
#asset_name ⇒ Object (readonly)
Returns the value of attribute asset_name.
5 6 7 |
# File 'lib/api/utils/asset.rb', line 5 def asset_name @asset_name end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/api/utils/asset.rb', line 5 def id @id end |
#localized_names ⇒ Object (readonly)
Returns the value of attribute localized_names.
5 6 7 |
# File 'lib/api/utils/asset.rb', line 5 def localized_names @localized_names end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/api/utils/asset.rb', line 5 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/api/utils/asset.rb', line 5 def type @type end |