Module: Texter

Defined in:
lib/texter.rb,
lib/texter/engine.rb,
lib/texter/version.rb,
app/models/texter/text.rb,
app/lib/texter/formatter.rb,
app/lib/texter/build_text.rb,
app/lib/texter/preprocessor.rb,
app/lib/texter/callable_class.rb,
app/helpers/texter/texts_helper.rb,
app/lib/texter/simple_formatter.rb,
app/lib/texter/textile_formatter.rb,
app/lib/texter/clean_preprocessor.rb,
app/lib/texter/markdown_formatter.rb,
app/presenters/texter/text_presenter.rb,
app/helpers/texter/application_helper.rb,
app/controllers/texter/texts_controller.rb,
app/lib/texter/run_preprocessors_on_text.rb,
app/lib/texter/art_typograph_preprocessor.rb

Defined Under Namespace

Modules: ApplicationHelper, CallableClass, TextsHelper Classes: ApplicationController, ArtTypographPreprocessor, BuildText, CleanPreprocessor, Engine, Formatter, MarkdownFormatter, Preprocessor, RunPreprocessorsOnText, SimpleFormatter, Text, TextPresenter, TextileFormatter, TextsController

Constant Summary collapse

VERSION =
"1.1.0"

Class Method Summary collapse

Class Method Details

.find_formatter(name) ⇒ Object

Parameters:

  • name (Symbol, String)


20
21
22
# File 'lib/texter.rb', line 20

def find_formatter(name)
  "Texter::#{name.to_s.classify}Formatter".constantize
end

.find_preprocessor(name) ⇒ Object

Parameters:

  • name (Symbol, String)


25
26
27
# File 'lib/texter.rb', line 25

def find_preprocessor(name)
  "Texter::#{name.to_s.classify}Preprocessor".constantize
end

.translate(path, options = {}) ⇒ Object



29
30
31
# File 'lib/texter.rb', line 29

def translate(path, options = {})
  I18n.t(path, { :scope => 'texter' }.merge(options))
end