Class: Chatoperastore::AbstractClient
- Inherits:
-
Object
- Object
- Chatoperastore::AbstractClient
- Defined in:
- lib/chatoperastore.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#base_url ⇒ Object
Returns the value of attribute base_url.
Instance Method Summary collapse
-
#initialize ⇒ AbstractClient
constructor
A new instance of AbstractClient.
Constructor Details
#initialize ⇒ AbstractClient
Returns a new instance of AbstractClient.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/chatoperastore.rb', line 34 def initialize super if ENV.has_key?(LICENSE_STORE_PROVIDER) && !ENV[LICENSE_STORE_PROVIDER].strip.empty? @base_url = ENV[LICENSE_STORE_PROVIDER].strip if @base_url.end_with?("/") @base_url = @base_url.chop end unless VALID_BASEURLS.include?(@base_url) raise InvalidProviderError.new "Invalid Base Url value for chatopera store." end else @base_url = "https://store.chatopera.com" end end |
Instance Attribute Details
#base_url ⇒ Object
Returns the value of attribute base_url.
32 33 34 |
# File 'lib/chatoperastore.rb', line 32 def base_url @base_url end |