Module: CrazyHarry
- Defined in:
- lib/crazy_harry.rb,
lib/crazy_harry/base.rb,
lib/crazy_harry/change.rb,
lib/crazy_harry/foster.rb,
lib/crazy_harry/redact.rb,
lib/crazy_harry/default.rb,
lib/crazy_harry/version.rb,
lib/crazy_harry/truncate.rb,
lib/crazy_harry/translate.rb
Defined Under Namespace
Modules: Change, Default, Foster, FosterModule, Redact, Translate, Truncate Classes: Base
Constant Summary collapse
- VERSION =
"0.2.1"
Instance Attribute Summary collapse
-
#base ⇒ Object
Returns the value of attribute base.
Class Method Summary collapse
Instance Attribute Details
#base ⇒ Object
Returns the value of attribute base.
9 10 11 |
# File 'lib/crazy_harry.rb', line 9 def base @base end |
Class Method Details
.fragment(fragment, opts = {}) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/crazy_harry.rb', line 13 def fragment(fragment, opts = {}) preserve_brs = opts.delete(:preserve_brs) preserve_dupes = opts.delete(:preserve_dupes) base = Base.new(fragment: fragment) base.no_blanks! base.convert_br_to_p! unless preserve_brs base.dedupe! unless preserve_dupes base end |
.to_s ⇒ Object
23 24 25 |
# File 'lib/crazy_harry.rb', line 23 def to_s @base.to_s end |