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_idObject



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

def 
  config.
end

.backendObject



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

def backend
  config.backend
end

.configObject



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

.configure {|PhraseApp::InContextEditor::Config| ... } ⇒ Object



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

def self.configure
  yield(PhraseApp::InContextEditor::Config)
end

.datacenterObject



36
37
38
# File 'lib/phraseapp-in-context-editor-ruby.rb', line 36

def datacenter
  config.datacenter
end

.disabled?Boolean

Returns:

  • (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

Returns:

  • (Boolean)


44
45
46
# File 'lib/phraseapp-in-context-editor-ruby.rb', line 44

def enabled?
  config.enabled
end

.originObject



52
53
54
# File 'lib/phraseapp-in-context-editor-ruby.rb', line 52

def origin
  config.origin
end

.prefixObject



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

def prefix
  config.prefix
end

.project_idObject



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

def project_id
  config.project_id
end

.suffixObject



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