class ClubhouseRuby::Clubhouse
Attributes
response_format[RW]
token[RW]
Public Class Methods
new(token, response_format: :json)
click to toggle source
This is the basic object to interact with the clubhouse api. An api token is required, and optionally the response format can be set.
# File lib/clubhouse_ruby.rb, line 15 def initialize(token, response_format: :json) raise ArgumentError unless input_valid?(token, response_format) self.token = token self.response_format = response_format end
Private Instance Methods
input_valid?(token, response_format)
click to toggle source
# File lib/clubhouse_ruby.rb, line 24 def input_valid?(token, response_format) !token.nil? && FORMATS.keys.include?(response_format) end