Class: SourceLicenseSDK::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



79
80
81
82
83
84
85
86
87
# File 'lib/source_license_sdk.rb', line 79

def initialize
  @server_url = nil
  @license_key = nil
  @machine_id = nil
  @auto_generate_machine_id = true
  @timeout = 30
  @user_agent = "SourceLicenseSDK/#{VERSION}"
  @verify_ssl = true
end

Instance Attribute Details

#auto_generate_machine_idObject

Returns the value of attribute auto_generate_machine_id.



76
77
78
# File 'lib/source_license_sdk.rb', line 76

def auto_generate_machine_id
  @auto_generate_machine_id
end

#license_keyObject

Returns the value of attribute license_key.



76
77
78
# File 'lib/source_license_sdk.rb', line 76

def license_key
  @license_key
end

#machine_idObject

Returns the value of attribute machine_id.



76
77
78
# File 'lib/source_license_sdk.rb', line 76

def machine_id
  @machine_id
end

#server_urlObject

Returns the value of attribute server_url.



76
77
78
# File 'lib/source_license_sdk.rb', line 76

def server_url
  @server_url
end

#timeoutObject

Returns the value of attribute timeout.



76
77
78
# File 'lib/source_license_sdk.rb', line 76

def timeout
  @timeout
end

#user_agentObject

Returns the value of attribute user_agent.



76
77
78
# File 'lib/source_license_sdk.rb', line 76

def user_agent
  @user_agent
end

#verify_sslObject

Returns the value of attribute verify_ssl.



76
77
78
# File 'lib/source_license_sdk.rb', line 76

def verify_ssl
  @verify_ssl
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


89
90
91
# File 'lib/source_license_sdk.rb', line 89

def valid?
  !server_url.nil? && !server_url.empty?
end