Class: KodiClient::Types::Media::MediaArtwork

Inherits:
Object
  • Object
show all
Extended by:
Extensions::Creatable
Includes:
Extensions::Comparable
Defined in:
lib/kodi_client/types/media/media_artwork_type.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Extensions::Creatable

arr_to_mapping, attr_accessor, attr_reader, attr_writer, create, create_list, extract_field_from_hash, fields_to_map, hash_to_arr, type_mapping

Methods included from Extensions::Comparable

#==, #compare

Constructor Details

#initialize(banner, fan_art, poster, thumb) ⇒ MediaArtwork

Returns a new instance of MediaArtwork.



13
14
15
16
17
18
# File 'lib/kodi_client/types/media/media_artwork_type.rb', line 13

def initialize(banner, fan_art, poster, thumb)
  @banner = banner
  @fan_art = fan_art
  @poster = poster
  @thumb = thumb
end

Instance Attribute Details

Returns the value of attribute banner.



11
12
13
# File 'lib/kodi_client/types/media/media_artwork_type.rb', line 11

def banner
  @banner
end

#fan_artObject (readonly)

Returns the value of attribute fan_art.



11
12
13
# File 'lib/kodi_client/types/media/media_artwork_type.rb', line 11

def fan_art
  @fan_art
end

#posterObject (readonly)

Returns the value of attribute poster.



11
12
13
# File 'lib/kodi_client/types/media/media_artwork_type.rb', line 11

def poster
  @poster
end

#thumbObject (readonly)

Returns the value of attribute thumb.



11
12
13
# File 'lib/kodi_client/types/media/media_artwork_type.rb', line 11

def thumb
  @thumb
end

Instance Method Details

#to_hObject



20
21
22
# File 'lib/kodi_client/types/media/media_artwork_type.rb', line 20

def to_h
  { 'banner' => @banner, 'fanart' => @fan_art, 'poster' => @poster, 'thumb' => @thumb }
end