class Player
init access class
Public Class Methods
new(options = {})
click to toggle source
# File lib/chili_player/init.rb, line 12 def initialize(options = {}) options.each do |key, value| instance_variable_set("@#{key}", value) end end
Private Instance Methods
endpoint_url()
click to toggle source
# File lib/chili_player/init.rb, line 27 def endpoint_url ChiliPlayer::ALLOWED_URLS.include?(@url) ? @url : ChiliPlayer::DEFAULT_URL end
header_request()
click to toggle source
# File lib/chili_player/init.rb, line 20 def header_request { token: @token.to_s, 'external-id' => @external_id.to_s } end