Class: Trunction::Truncation
- Inherits:
-
Object
- Object
- Trunction::Truncation
- Defined in:
- lib/trunction.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(doc, max) ⇒ Truncation
constructor
A new instance of Truncation.
Constructor Details
#initialize(doc, max) ⇒ Truncation
Returns a new instance of Truncation.
16 17 18 19 20 |
# File 'lib/trunction.rb', line 16 def initialize(doc, max) @doc = doc @max = max @chars_remaining = max end |
Instance Method Details
#execute ⇒ Object
22 23 24 25 |
# File 'lib/trunction.rb', line 22 def execute find_the_end remove_everything_else end |