Module: QuestionproRails

Defined in:
lib/questionpro_rails.rb,
lib/questionpro_rails/choice.rb,
lib/questionpro_rails/survey.rb,
lib/questionpro_rails/account.rb,
lib/questionpro_rails/section.rb,
lib/questionpro_rails/version.rb,
lib/questionpro_rails/question.rb,
lib/questionpro_rails/template.rb,
lib/questionpro_rails/email_list.rb,
lib/questionpro_rails/api_request.rb,
lib/questionpro_rails/email_batch.rb,
lib/questionpro_rails/email_group.rb,
lib/questionpro_rails/survey_meta.rb,
lib/questionpro_rails/response_set.rb,
lib/questionpro_rails/configuration.rb,
lib/questionpro_rails/email_template.rb,
lib/questionpro_rails/response_answer.rb,
lib/questionpro_rails/survey_response.rb,
lib/questionpro_rails/unsubscribed_email.rb,
lib/questionpro_rails/email_list_statistic.rb,
lib/questionpro_rails/survey_response_count.rb

Defined Under Namespace

Classes: Account, ApiRequest, Choice, Configuration, EmailBatch, EmailGroup, EmailList, EmailListStatistic, EmailTemplate, Question, ResponseAnswer, ResponseSet, Section, Survey, SurveyMeta, SurveyResponse, SurveyResponseCount, Template, UnsubscribedEmail

Constant Summary collapse

VERSION =

Gem Version

"0.1.8"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationQuestionproRails::Configuration

Get the Configurations or Reset

Returns:



15
16
17
# File 'lib/questionpro_rails.rb', line 15

def configuration
  @configuration
end

Class Method Details

.api_keyString

Get the api key from the configurations

Returns:

  • (String)

    Api Key



32
33
34
# File 'lib/questionpro_rails.rb', line 32

def api_key
  configuration.api_key
end

.configure {|configuration| ... } ⇒ Object

Holds the configurtion block

Yields:



25
26
27
# File 'lib/questionpro_rails.rb', line 25

def configure
  yield(configuration)
end

.resetObject

Reset Configuration to nil



20
21
22
# File 'lib/questionpro_rails.rb', line 20

def reset
  @configuration = Configuration.new
end