Sha256: d98a7ab24670619bc73f89ff5a47fb22e65d6f35a0fbd50af7ad413e80345c13

Contents?: true

Size: 435 Bytes

Versions: 8

Compression:

Stored size: 435 Bytes

Contents

# -*- encoding : utf-8 -*-

module Phrase::Delegate
  class Base < String
    def to_s
      "#{decorated_key_name}"
    end
    
    def self.log(message)
      message = "phrase: #{message}"
      if defined?(Rails)
        Rails.logger.warn(message)
      else
        $stderr.puts message
      end
    end
    
  protected
    def decorated_key_name
      "#{Phrase.prefix}phrase_#{@display_key}#{Phrase.suffix}"
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
phrase-0.4.1 lib/phrase/delegate.rb
phrase-0.4.0 lib/phrase/delegate.rb
phrase-0.3.7 lib/phrase/delegate.rb
phrase-0.3.6 lib/phrase/delegate.rb
phrase-0.3.5 lib/phrase/delegate.rb
phrase-0.3.4 lib/phrase/delegate.rb
phrase-0.3.3 lib/phrase/delegate.rb
phrase-0.3.2 lib/phrase/delegate.rb