Sha256: 4b0b702e60e453d6d65bb886f3aeb65957d5e94d81839de012c43d815ceda600
Contents?: true
Size: 382 Bytes
Versions: 2
Compression:
Stored size: 382 Bytes
Contents
def parse(html) Nokogiri::HTML::DocumentFragment.parse(html).children.first end class String # Strip leading whitespace from each line that is the same as the # amount of whitespace on the first line of the string. # Leaves _additional_ indentation on later lines intact. # @see http://stackoverflow.com/q/3772864 def unindent gsub /^#{self[/\A\s*/]}/, '' end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pricecut-0.0.3 | spec/spec_helper.rb |
pricecut-0.0.2 | spec/spec_helper.rb |