Method: Shift::String#initialize

Defined in:
lib/shift/string.rb

#initialize(str = '', name = nil) ⇒ Shift::String

Create a new shift string from a standard string.

Parameters:

  • str (String) (defaults to: '')

    The source string

  • name (String) (defaults to: nil)

    A file path, partial path, or extension associated with the string.



97
98
99
100
# File 'lib/shift/string.rb', line 97

def initialize(str='', name=nil)
  super(str)
  @name = name
end