Class: Filemaker::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/filemaker/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



8
9
10
11
12
13
# File 'lib/filemaker/configuration.rb', line 8

def initialize
  @endpoint = '/fmi/xml/fmresultset.xml'
  @timeout = 0
  @ssl_verifypeer = false
  @ssl_verifyhost = 0
end

Instance Attribute Details

#account_nameObject

Returns the value of attribute account_name.



3
4
5
# File 'lib/filemaker/configuration.rb', line 3

def 
  @account_name
end

#endpointObject

Returns the value of attribute endpoint.



3
4
5
# File 'lib/filemaker/configuration.rb', line 3

def endpoint
  @endpoint
end

#hostObject

Returns the value of attribute host.



3
4
5
# File 'lib/filemaker/configuration.rb', line 3

def host
  @host
end

#logObject

Returns the value of attribute log.



6
7
8
# File 'lib/filemaker/configuration.rb', line 6

def log
  @log
end

#passwordObject

Returns the value of attribute password.



3
4
5
# File 'lib/filemaker/configuration.rb', line 3

def password
  @password
end

#sslObject

Returns the value of attribute ssl.



4
5
6
# File 'lib/filemaker/configuration.rb', line 4

def ssl
  @ssl
end

#ssl_verifyhostObject

Returns the value of attribute ssl_verifyhost.



4
5
6
# File 'lib/filemaker/configuration.rb', line 4

def ssl_verifyhost
  @ssl_verifyhost
end

#ssl_verifypeerObject

Returns the value of attribute ssl_verifypeer.



4
5
6
# File 'lib/filemaker/configuration.rb', line 4

def ssl_verifypeer
  @ssl_verifypeer
end

#timeoutObject

Returns the value of attribute timeout.



5
6
7
# File 'lib/filemaker/configuration.rb', line 5

def timeout
  @timeout
end

Instance Method Details

#connection_optionsObject



25
26
27
# File 'lib/filemaker/configuration.rb', line 25

def connection_options
  ssl.is_a?(Hash) ? { ssl: ssl } : {}
end

#is_ssl?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/filemaker/configuration.rb', line 29

def is_ssl?
  ssl.is_a?(Hash) || ssl == true
end

#not_configurable?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/filemaker/configuration.rb', line 15

def not_configurable?
  host_missing? ||  || password_missing?
end

#urlObject



33
34
35
# File 'lib/filemaker/configuration.rb', line 33

def url
  is_ssl? ? "https://#{host}" : "http://#{host}"
end