class Signetify::Client
Attributes
client[RW]
error_message[R]
response[R]
Public Class Methods
client()
click to toggle source
# File lib/signetify.rb, line 24 def self.client @client ||= fresh_client end
client_options()
click to toggle source
# File lib/signetify.rb, line 28 def self.client_options template = ERB.new File.new("#{Rails.root}/config/signetify.yml").read YAML.load template.result(binding) end
fresh_client()
click to toggle source
# File lib/signetify.rb, line 33 def self.fresh_client Signet::OAuth2::Client.new(client_options) end
new(options={})
click to toggle source
# File lib/signetify.rb, line 9 def initialize(options={}) @response = options[:response] @error_message = options[:error_message] end
Public Instance Methods
successful?()
click to toggle source
# File lib/signetify.rb, line 37 def successful? response.present? end