Module: TextTube::Baby::Spiffing
- Extended by:
- Filterable
- Defined in:
- lib/texttube/baby/spiffing.rb
Overview
Will transform the Queen’s English into American English for use in CSS, as the current CSS standards prefer ugly words. Inspired by visualidiot’s SpiffingCSS (see spiffingcss.com/)
Constant Summary collapse
- DICTIONARY =
The dictionary.
{ # Queen's English # Primitive English from our stateside # friends from across the pond. 'colour' => 'color', 'grey' => 'gray', '!please' => '!important', 'transparency' => 'opacity', 'centre' => 'center', 'plump' => 'bold', 'photograph' => 'image', 'capitalise' => 'capitalize' }
Class Method Summary collapse
Class Method Details
.run(content, options = {}) ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/texttube/baby/spiffing.rb', line 33 def self.run( content, ={}) ugly_child = content.dup # warn ugly_child DICTIONARY.each do |english, ugly| ugly_child.sub! english, ugly # warn ugly_child end ugly_child end |