module Ruconomic
Constants
- URL
- VERSION
Attributes
agreement[RW]
app_identifier[RW]
app_token[RW]
follow_redirects[RW]
max_redirects[RW]
password[RW]
timeout[RW]
token[RW]
url[RW]
username[RW]
Public Class Methods
configure() { |self| ... }
click to toggle source
# File lib/ruconomic.rb, line 23 def configure &block yield self if block_given? end
session() { |API| ... }
click to toggle source
# File lib/ruconomic.rb, line 43 def session(&block) with_credential = agreement && username && password && url with_token = token && app_token && url if with_credential Ruconomic::API.connect(Ruconomic.agreement, Ruconomic.username, Ruconomic.password) elsif with_token Ruconomic::API.connect_with_token(Ruconomic.token, Ruconomic.app_token) else raise "Not configured" end yield self::API if block_given? ensure Ruconomic::API.disconnect end