Class: ValorantDailyStore::Skin

Inherits:
Object
  • Object
show all
Defined in:
lib/valorant_daily_store/skin.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



23
24
25
# File 'lib/valorant_daily_store/skin.rb', line 23

def name
  @name
end

#photoObject (readonly)

Returns the value of attribute photo.



23
24
25
# File 'lib/valorant_daily_store/skin.rb', line 23

def photo
  @photo
end

#priceObject (readonly)

Returns the value of attribute price.



23
24
25
# File 'lib/valorant_daily_store/skin.rb', line 23

def price
  @price
end

#videoObject (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_hashObject



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_jsonObject



19
20
21
# File 'lib/valorant_daily_store/skin.rb', line 19

def to_json(...)
  to_hash.to_json(...)
end