Module: Trakt::Connection

Included in:
Account, Activity, Calendar, Friends, Genres, List, Movie, Search, Show
Defined in:
lib/trakt/connection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#traktObject (readonly)

Returns the value of attribute trakt.



3
4
5
# File 'lib/trakt/connection.rb', line 3

def trakt
  @trakt
end

Instance Method Details

#initialize(trakt) ⇒ Object



4
5
6
# File 'lib/trakt/connection.rb', line 4

def initialize(trakt)
  @trakt = trakt
end

#require_settings(required) ⇒ Object



10
11
12
13
14
# File 'lib/trakt/connection.rb', line 10

def require_settings(required)
  required.each do |setting|
    raise "Required setting #{setting} is missing." unless trakt.send(setting)
  end
end