Class: JustWatch::Country

Inherits:
Struct
  • Object
show all
Defined in:
lib/just_watch/country.rb

Constant Summary collapse

COUNTRY_PATH =
'/countries'

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#countryObject

Returns the value of attribute country

Returns:

  • (Object)

    the current value of country



4
5
6
# File 'lib/just_watch/country.rb', line 4

def country
  @country
end

#currencyObject

Returns the value of attribute currency

Returns:

  • (Object)

    the current value of currency



4
5
6
# File 'lib/just_watch/country.rb', line 4

def currency
  @currency
end

#full_localeObject

Returns the value of attribute full_locale

Returns:

  • (Object)

    the current value of full_locale



4
5
6
# File 'lib/just_watch/country.rb', line 4

def full_locale
  @full_locale
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



4
5
6
# File 'lib/just_watch/country.rb', line 4

def status
  @status
end

#url_partObject

Returns the value of attribute url_part

Returns:

  • (Object)

    the current value of url_part



4
5
6
# File 'lib/just_watch/country.rb', line 4

def url_part
  @url_part
end

Class Method Details

.listObject



8
9
10
11
12
13
14
# File 'lib/just_watch/country.rb', line 8

def list
  countries = Api.request(COUNTRY_PATH)

  countries.map do |country|
    new(country.slice(*members))
  end
end