Class: PhraseApp::InContextEditor::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/phraseapp-in-context-editor-ruby/config.rb

Instance Method Summary collapse

Instance Method Details

#access_tokenObject



15
16
17
18
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 15

def access_token
  @@access_token = "" if !defined? @@access_token or @@access_token.nil?
  @@access_token
end

#access_token=(access_token) ⇒ Object



20
21
22
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 20

def access_token=(access_token)
  @@access_token = access_token
end

#api_clientObject



50
51
52
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 50

def api_client
  @@api_client ||= authorized_api_client
end

#api_hostObject



70
71
72
73
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 70

def api_host
  @@api_host = "https://api.phraseapp.com" if !defined? @@api_host or @@api_host.nil?
  @@api_host
end

#api_host=(api_host) ⇒ Object



75
76
77
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 75

def api_host=(api_host)
  @@api_host = api_host
end

#backendObject



42
43
44
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 42

def backend
  @@backend ||= PhraseApp::InContextEditor::BackendService.new
end

#backend=(backend) ⇒ Object



46
47
48
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 46

def backend=(backend)
  @@backend = backend
end

#cache_key_segments_initialObject



112
113
114
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 112

def cache_key_segments_initial
  @@cache_key_segments_initial ||= ["simple_form"]
end

#cache_key_segments_initial=(cache_key_segments_initial = []) ⇒ Object



116
117
118
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 116

def cache_key_segments_initial=(cache_key_segments_initial=[])
  @@cache_key_segments_initial = cache_key_segments_initial
end

#cache_lifetimeObject



120
121
122
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 120

def cache_lifetime
  @@cache_lifetime ||= 300
end

#cache_lifetime=(cache_lifetime) ⇒ Object



124
125
126
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 124

def cache_lifetime=(cache_lifetime)
  @@cache_lifetime = cache_lifetime
end

#enabledObject



24
25
26
27
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 24

def enabled
  @@enabled = false if !defined? @@enabled or @@enabled.nil?
  @@enabled
end

#enabled=(enabled) ⇒ Object



29
30
31
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 29

def enabled=(enabled)
  @@enabled = enabled
end

#ignored_keysObject



128
129
130
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 128

def ignored_keys
  @@ignored_keys ||= []
end

#ignored_keys=(ignored_keys) ⇒ Object



132
133
134
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 132

def ignored_keys=(ignored_keys)
  @@ignored_keys = ignored_keys
end

#js_hostObject



79
80
81
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 79

def js_host
  @@js_host ||= 'phraseapp.com'
end

#js_host=(js_host) ⇒ Object



83
84
85
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 83

def js_host=(js_host)
  @@js_host = js_host
end

#js_optionsObject



104
105
106
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 104

def js_options
  @@js_options ||= {}
end

#js_options=(js_options) ⇒ Object



108
109
110
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 108

def js_options=(js_options)
  @@js_options = js_options
end

#js_pathObject



96
97
98
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 96

def js_path
  @@js_path ||= "/assets/in-context-editor/2.0/app.js"
end

#js_path=(js_path) ⇒ Object



100
101
102
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 100

def js_path=(js_path)
  @@js_path = js_path
end

#js_use_sslObject



87
88
89
90
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 87

def js_use_ssl
  @@js_use_ssl = true if !defined? @@js_use_ssl or @@js_use_ssl.nil?
  @@js_use_ssl
end

#js_use_ssl=(js_use_ssl) ⇒ Object



92
93
94
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 92

def js_use_ssl=(js_use_ssl)
  @@js_use_ssl = js_use_ssl
end

#prefixObject



54
55
56
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 54

def prefix
  @@prefix ||= "{{__"
end

#prefix=(prefix) ⇒ Object



58
59
60
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 58

def prefix=(prefix)
  @@prefix = prefix
end

#project_idObject



6
7
8
9
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 6

def project_id
  @@project_id = "" if !defined? @@project_id or @@project_id.nil?
  @@project_id
end

#project_id=(project_id) ⇒ Object



11
12
13
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 11

def project_id=(project_id)
  @@project_id = project_id
end

#skip_ssl_verificationObject



33
34
35
36
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 33

def skip_ssl_verification
  @@skip_ssl_verification = false if !defined? @@skip_ssl_verification or @@skip_ssl_verification.nil?
  @@skip_ssl_verification
end

#skip_ssl_verification=(skip_ssl_verification) ⇒ Object



38
39
40
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 38

def skip_ssl_verification=(skip_ssl_verification)
  @@skip_ssl_verification = skip_ssl_verification
end

#suffixObject



62
63
64
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 62

def suffix
  @@suffix ||= "__}}"
end

#suffix=(suffix) ⇒ Object



66
67
68
# File 'lib/phraseapp-in-context-editor-ruby/config.rb', line 66

def suffix=(suffix)
  @@suffix = suffix
end