Sha256: eab6346428d3af9ff318f591cabc11eaa314c6bc863b38c7c2d3fe8010d911a5
Contents?: true
Size: 922 Bytes
Versions: 7
Compression:
Stored size: 922 Bytes
Contents
# -*- coding: utf-8 -*- module Krikri::Enrichments ## # Enrichment to capitalize sentences in a text field # # Capitalize.new.enrich_value( # 'THE MOOMIN BOOKS MAKE FOR BOTH SPLENDID BEDTIME READ-ALOUDS AND ' \ # "SOLITARY SAVORING. IT’S MORE THAN FORTY YEARS SINCE JANSSON’S " \ # 'MOOMINTROLLS FIRST APPEARED. I FOUND THE WRITING AND INVENTION ' \ # 'AS APPEALING AS EVER. SHE HAS A THISTLEDOWN TOUCH.' # => 'The moomin books make for both splendid bedtime read-alouds and ' \ # "solitary savoring. It’s more than forty years since jansson’s " \ # 'moomintrolls first appeared. I found the writing and invention ' \ # 'as appealing as ever. She has a thistledown touch.' # class Capitalize include Krikri::FieldEnrichment def enrich_value(value) return value unless value.respond_to? :capitalize value.captialize end end end
Version data entries
7 entries across 7 versions & 1 rubygems