module Typeset::HangingPunctuation

Contains constants and methods specific to our hanging punctuation implementation

Constants

DoubleWidth

Characters that need a double-width pull

SingleWidth

Characters that need a single-width pull

Public Class Methods

pull(classname, content='') click to toggle source

Wrap a piece of content in a pull class

# File lib/typeset/hanging_punctuation.rb, line 10
def self.pull(classname, content='')
  HangingPunctuation.wrap("pull", classname, content)
end
push(classname, content='') click to toggle source

Wrap a piece of content in a push class

# File lib/typeset/hanging_punctuation.rb, line 15
def self.push(classname, content='')
  HangingPunctuation.wrap("push", classname, content)
end
wrap(type, classname, content='') click to toggle source

Wrap a piece of content in an arbitrary class. Convenience method for implementing push and pull

# File lib/typeset/hanging_punctuation.rb, line 21
def self.wrap(type, classname, content='')
  "<span class=\"#{type}-#{classname}\">#{content}</span>"
end