Class: WebfleetConnect::DefaultConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/webfleet_connect/default_config.rb

Constant Summary collapse

HOST =
'csv.webfleet.com'
PATH =
'extern'

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ DefaultConfig

Returns a new instance of DefaultConfig.



5
6
7
8
9
10
11
# File 'lib/webfleet_connect/default_config.rb', line 5

def initialize(args = {})
  args = default_arguments.merge(args)
  @lang       = args[:lang]
  @format     = args[:format]
  @useUTF8    = args[:useUTF8]
  @useISO8601 = args[:useISO8601]
end

Instance Method Details

#json?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/webfleet_connect/default_config.rb', line 17

def json?
  @format == :json
end

#to_sObject



13
14
15
# File 'lib/webfleet_connect/default_config.rb', line 13

def to_s
  "#{base_url}?#{lang}&#{format}&#{useUTF8}&#{useISO8601}"
end