Sha256: 314196409c1aa6962c85763dac2129e7950564872a5901ba019a50ebf3372381
Contents?: true
Size: 672 Bytes
Versions: 17
Compression:
Stored size: 672 Bytes
Contents
module Wework class Engine attr_reader :corp_id, :corp_secret, :app_id, :app_secret def initialize(options={}) @corp_id = options[:corp_id] @corp_secret = options[:corp_secret] @app_id = options[:app_id] @app_secret = options[:app_secret] end def contact @contact ||= Wework::Api::Contact.new(corp_id, corp_secret) if contact? end def agent @agent ||= Wework::Api::Agent.new(corp_id, app_id, app_secret) if agent? end private def agent? corp_id.present? && app_id.present? && app_secret.present? end def contact? corp_id.present? && corp_secret.present? end end end
Version data entries
17 entries across 17 versions & 1 rubygems