Class: TsJsonApi::Configure

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

Constant Summary collapse

LOG_FILE_DIRECTORY =
Rails.root.join('log', 'ts_json_api')

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_versionObject

Returns the value of attribute api_version.



8
9
10
# File 'lib/ts_json_api/configure.rb', line 8

def api_version
  @api_version
end

.logging_enabledObject Also known as: logging_enabled?

Returns the value of attribute logging_enabled.



8
9
10
# File 'lib/ts_json_api/configure.rb', line 8

def logging_enabled
  @logging_enabled
end

.passwordObject



19
20
21
22
# File 'lib/ts_json_api/configure.rb', line 19

def password
  raise "Must provide a password" if @password.blank?
  @password
end

.server_urlObject



24
25
26
27
# File 'lib/ts_json_api/configure.rb', line 24

def server_url
  raise "Must provide a server URL for the API" if @server_url.blank?
  @server_url
end

.timestamped_logsObject Also known as: timestamped_logs?

Returns the value of attribute timestamped_logs.



8
9
10
# File 'lib/ts_json_api/configure.rb', line 8

def timestamped_logs
  @timestamped_logs
end

.usernameObject



14
15
16
17
# File 'lib/ts_json_api/configure.rb', line 14

def username
	raise "Must provide an username" if @username.blank?
  @username
end

Class Method Details

.setup(&block) ⇒ Object



29
30
31
# File 'lib/ts_json_api/configure.rb', line 29

def setup(&block)
  block.call(self)
end