class String
Used to add functionality to the Ruby String
class.
Attributes
expected[RW]
Public Class Methods
new(value, expected)
click to toggle source
# File lib/string.rb, line 5 def self.new(value, expected) string = value string.expected = expected string end
Public Instance Methods
first()
click to toggle source
# File lib/string.rb, line 11 def first self[0, 1] end
shift_left(num = 1)
click to toggle source
# File lib/string.rb, line 15 def shift_left(num = 1) self[num..-1] end