Sha256: 6213a38a4a8a1630b376a35ade42ab2e37fa48a6d4b46c1dec4b7f3146f86543

Contents?: true

Size: 793 Bytes

Versions: 6

Compression:

Stored size: 793 Bytes

Contents

=begin
  gettext/cgi.rb - GetText for CGI

  Copyright (C) 2005-2009  Masao Mutoh

  You may redistribute it and/or modify it under the same
  license terms as Ruby.

  $Id$
=end

require 'cgi'
require 'gettext'

Locale.init(:driver => :cgi)

module GetText

  # Sets a CGI object. This methods is appeared when requiring "gettext/cgi".
  # * cgi_: CGI object
  # * Returns: self
  def set_cgi(cgi_)
    Locale.set_cgi(cgi_)
  end

  # Same as GetText.set_cgi. This methods is appeared when requiring "gettext/cgi".
  # * cgi_: CGI object
  # * Returns: cgi_
  def cgi=(cgi_)
    set_cgi(cgi_)
    cgi_
  end

  # Gets the CGI object. If it is nil, returns new CGI object. This methods is appeared when requiring "gettext/cgi".
  # * Returns: the CGI object
  def cgi
    Locale.cgi
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
experteer-gettext-2.0.4.1 lib/gettext/cgi.rb
experteer-gettext-2.0.4.2 lib/gettext/cgi.rb
experteer-gettext-2.0.4 lib/gettext/cgi.rb
gettext-2.0.2 lib/gettext/cgi.rb
gettext-2.0.3 lib/gettext/cgi.rb
gettext-2.0.4 lib/gettext/cgi.rb