Module: PhraseApp::InContextEditor
- Defined in:
- lib/phraseapp-in-context-editor-ruby.rb,
lib/phraseapp-in-context-editor-ruby/config.rb,
lib/phraseapp-in-context-editor-ruby/engine.rb,
lib/phraseapp-in-context-editor-ruby/delegate.rb,
lib/phraseapp-in-context-editor-ruby/view_helpers.rb,
lib/phraseapp-in-context-editor-ruby/backend_service.rb,
lib/phraseapp-in-context-editor-ruby/delegate/fast_gettext.rb,
lib/phraseapp-in-context-editor-ruby/delegate/i18n_delegate.rb
Defined Under Namespace
Modules: Delegate, ViewHelpers
Classes: BackendService, Config, Engine
Class Method Summary
collapse
Class Method Details
.account_id ⇒ Object
32
33
34
|
# File 'lib/phraseapp-in-context-editor-ruby.rb', line 32
def account_id
config.account_id
end
|
.backend ⇒ Object
16
17
18
|
# File 'lib/phraseapp-in-context-editor-ruby.rb', line 16
def backend
config.backend
end
|
.config ⇒ Object
8
9
10
|
# File 'lib/phraseapp-in-context-editor-ruby.rb', line 8
def config
RequestStore.store[:phraseapp_config] ||= PhraseApp::InContextEditor::Config.new
end
|
.config=(value) ⇒ Object
12
13
14
|
# File 'lib/phraseapp-in-context-editor-ruby.rb', line 12
def config=(value)
RequestStore.store[:phraseapp_config] = value
end
|
.datacenter ⇒ Object
36
37
38
|
# File 'lib/phraseapp-in-context-editor-ruby.rb', line 36
def datacenter
config.datacenter
end
|
.disabled? ⇒ Boolean
48
49
50
|
# File 'lib/phraseapp-in-context-editor-ruby.rb', line 48
def disabled?
!config.enabled
end
|
.enabled=(value) ⇒ Object
40
41
42
|
# File 'lib/phraseapp-in-context-editor-ruby.rb', line 40
def enabled=(value)
config.enabled = value
end
|
.enabled? ⇒ Boolean
44
45
46
|
# File 'lib/phraseapp-in-context-editor-ruby.rb', line 44
def enabled?
config.enabled
end
|
.origin ⇒ Object
52
53
54
|
# File 'lib/phraseapp-in-context-editor-ruby.rb', line 52
def origin
config.origin
end
|
.prefix ⇒ Object
24
25
26
|
# File 'lib/phraseapp-in-context-editor-ruby.rb', line 24
def prefix
config.prefix
end
|
.project_id ⇒ Object
28
29
30
|
# File 'lib/phraseapp-in-context-editor-ruby.rb', line 28
def project_id
config.project_id
end
|
.suffix ⇒ Object
20
21
22
|
# File 'lib/phraseapp-in-context-editor-ruby.rb', line 20
def suffix
config.suffix
end
|
.with_config(config_options = {}, &block) ⇒ Object
61
62
63
64
65
66
67
|
# File 'lib/phraseapp-in-context-editor-ruby.rb', line 61
def self.with_config(config_options = {}, &block)
original_config = config.dup
config.assign_values(config_options)
yield
ensure
self.config = original_config
end
|