Class: Fileboost::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/fileboost/config.rb

Constant Summary collapse

CDN_DOMAIN =
"cdn.fileboost.dev"
BASE_URL =
"https://#{CDN_DOMAIN}"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



8
9
10
11
12
# File 'lib/fileboost/config.rb', line 8

def initialize
  @project_id = ENV["FILEBOOST_PROJECT_ID"]
  @token = ENV["FILEBOOST_TOKEN"]
  @patch_image_tag = false
end

Instance Attribute Details

#patch_image_tagObject

Returns the value of attribute patch_image_tag.



3
4
5
# File 'lib/fileboost/config.rb', line 3

def patch_image_tag
  @patch_image_tag
end

#project_idObject

Returns the value of attribute project_id.



3
4
5
# File 'lib/fileboost/config.rb', line 3

def project_id
  @project_id
end

#tokenObject

Returns the value of attribute token.



3
4
5
# File 'lib/fileboost/config.rb', line 3

def token
  @token
end

Instance Method Details

#base_urlObject



18
19
20
# File 'lib/fileboost/config.rb', line 18

def base_url
  BASE_URL
end

#valid?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/fileboost/config.rb', line 14

def valid?
  !project_id.empty? && !token.empty?
end