Sha256: 5b70abc1b2f905332df03fcd665645ebc240221608d593ce14084f46dd649d9d

Contents?: true

Size: 318 Bytes

Versions: 5

Compression:

Stored size: 318 Bytes

Contents

class NSString

  # This can be called as `"Hello".localized` or `"Hello"._`.  The `str._`
  # syntax is meant to be reminiscent of gettext-style `_(str)`.
  def localized(value=nil, table=nil)
    @localized = NSBundle.mainBundle.localizedStringForKey(self, value: value, table: table)
  end
  alias _ localized

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sugarcube-2.0.1 lib/cocoa/sugarcube-localized/nsstring.rb
sugarcube-2.0.0 lib/cocoa/sugarcube-localized/nsstring.rb
sugarcube-1.7.0 lib/sugarcube-localized/nsstring.rb
sugarcube-1.6.3 lib/sugarcube-localized/nsstring.rb
sugarcube-1.6.2 lib/sugarcube-localized/nsstring.rb