Class: ValorantDailyStore::Skin
- Inherits:
-
Object
- Object
- ValorantDailyStore::Skin
- Defined in:
- lib/valorant_daily_store/skin.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#photo ⇒ Object
readonly
Returns the value of attribute photo.
-
#price ⇒ Object
readonly
Returns the value of attribute price.
-
#video ⇒ Object
readonly
Returns the value of attribute video.
Instance Method Summary collapse
-
#initialize(name:, price:, photo:, video:) ⇒ Skin
constructor
A new instance of Skin.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(name:, price:, photo:, video:) ⇒ Skin
Returns a new instance of Skin.
3 4 5 6 7 8 |
# File 'lib/valorant_daily_store/skin.rb', line 3 def initialize(name:, price:, photo:, video:) @name = name @price = price @photo = photo @video = video end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
23 24 25 |
# File 'lib/valorant_daily_store/skin.rb', line 23 def name @name end |
#photo ⇒ Object (readonly)
Returns the value of attribute photo.
23 24 25 |
# File 'lib/valorant_daily_store/skin.rb', line 23 def photo @photo end |
#price ⇒ Object (readonly)
Returns the value of attribute price.
23 24 25 |
# File 'lib/valorant_daily_store/skin.rb', line 23 def price @price end |
#video ⇒ Object (readonly)
Returns the value of attribute video.
23 24 25 |
# File 'lib/valorant_daily_store/skin.rb', line 23 def video @video end |
Instance Method Details
#to_hash ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/valorant_daily_store/skin.rb', line 10 def to_hash { name:, price:, photo:, video: } end |
#to_json ⇒ Object
19 20 21 |
# File 'lib/valorant_daily_store/skin.rb', line 19 def to_json(...) to_hash.to_json(...) end |