Class: PhraseApp::InContextEditor::BackendService

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ BackendService

Returns a new instance of BackendService.



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

def initialize(args = {})
  self
end

Instance Attribute Details

#blacklisted_keys=(value) ⇒ Object

Sets the attribute blacklisted_keys

Parameters:

  • value

    the value to set the attribute blacklisted_keys to.



9
10
11
# File 'lib/phraseapp-in-context-editor-ruby/backend_service.rb', line 9

def blacklisted_keys=(value)
  @blacklisted_keys = value
end

Instance Method Details

#translate(*args) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/phraseapp-in-context-editor-ruby/backend_service.rb', line 15

def translate(*args)
  if to_be_translated_without_phraseapp?(args)
    I18n.translate_without_phraseapp(*args)
  else
    phraseapp_delegate_for(args)
  end
end