Class: PhraseApp::InContextEditor::Delegate::Base

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

Direct Known Subclasses

FastGettext, I18nDelegate

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.log(message) ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/phraseapp-in-context-editor-ruby/delegate.rb', line 18

def self.log(message)
  message = "phrase: #{message}"
  if defined?(Rails) && Rails.respond_to?(:logger)
    Rails.logger.warn(message)
  else
    warn message
  end
end

Instance Method Details

#to_sObject Also known as: camelize, underscore, classify, dasherize, tableize



5
6
7
# File 'lib/phraseapp-in-context-editor-ruby/delegate.rb', line 5

def to_s
  decorated_key_name.to_s
end