Sha256: 1901c71a6fab4c429e4dc4fc41a3c5b8edddf64b8a9beff788ff1fcb81eefe42
Contents?: true
Size: 514 Bytes
Versions: 175
Compression:
Stored size: 514 Bytes
Contents
module StringSpecs class MyString < String; end class MyArray < Array; end class MyRange < Range; end class SubString < String attr_reader :special def initialize(str=nil) @special = str end end class StringWithRaisingConstructor < String def initialize(str) raise ArgumentError.new('constructor was called') unless str == 'silly:string' self.replace(str) end end class StringNotReallyConvertable def to_str raise "Oups" end end end
Version data entries
175 entries across 135 versions & 2 rubygems