Class: String

Inherits:
Object show all
Includes:
Shef::Extensions::String
Defined in:
lib/chef/monkey_patches/string.rb,
lib/chef/shef/ext.rb,
lib/chef/monkey_patches/string.rb,
lib/chef/win32/unicode.rb

Overview

<= 1.8.6 needs some ord!

Instance Method Summary collapse

Methods included from Shef::Extensions::String

#on_off_to_bool

Instance Method Details

#linesObject



36
37
38
# File 'lib/chef/monkey_patches/string.rb', line 36

def lines
  enum_for(:each)
end

#ordObject



45
46
47
# File 'lib/chef/monkey_patches/string.rb', line 45

def ord
  self.unpack('C').first
end

#to_wstringObject



40
41
42
# File 'lib/chef/win32/unicode.rb', line 40

def to_wstring
  Chef::ReservedNames::Win32::Unicode.utf8_to_wide(self)
end