Class: InkFilePicker::Configuration

Inherits:
Object
  • Object
show all
Includes:
Assignable
Defined in:
lib/ink_file_picker/configuration.rb

Constant Summary collapse

API_DEFAULTS =
{
  secret: nil,
  default_expiry: 600, # in 10 hours
  cdn_url: 'https://www.filepicker.io/api/file/',
  filepicker_url: 'https://www.filepicker.io',
  store_path: '/api/store/S3',
  http_adapter: :net_http
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Assignable

#[], #[]=

Constructor Details

#initialize(attributes = {}) ⇒ Configuration

Returns a new instance of Configuration.



16
17
18
19
20
21
# File 'lib/ink_file_picker/configuration.rb', line 16

def initialize(attributes = {})
  assign API_DEFAULTS
  assign attributes

  verify!
end

Instance Attribute Details

#cdn_urlObject

Returns the value of attribute cdn_url.



14
15
16
# File 'lib/ink_file_picker/configuration.rb', line 14

def cdn_url
  @cdn_url
end

#default_expiryObject

Returns the value of attribute default_expiry.



14
15
16
# File 'lib/ink_file_picker/configuration.rb', line 14

def default_expiry
  @default_expiry
end

#filepicker_urlObject

Returns the value of attribute filepicker_url.



14
15
16
# File 'lib/ink_file_picker/configuration.rb', line 14

def filepicker_url
  @filepicker_url
end

#http_adapterObject

Returns the value of attribute http_adapter.



14
15
16
# File 'lib/ink_file_picker/configuration.rb', line 14

def http_adapter
  @http_adapter
end

#keyObject

Returns the value of attribute key.



14
15
16
# File 'lib/ink_file_picker/configuration.rb', line 14

def key
  @key
end

#secretObject

Returns the value of attribute secret.



14
15
16
# File 'lib/ink_file_picker/configuration.rb', line 14

def secret
  @secret
end

#store_pathObject

Returns the value of attribute store_path.



14
15
16
# File 'lib/ink_file_picker/configuration.rb', line 14

def store_path
  @store_path
end