Class: Trunction::Truncation

Inherits:
Object
  • Object
show all
Defined in:
lib/trunction.rb

Instance Method Summary collapse

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

#executeObject



22
23
24
25
# File 'lib/trunction.rb', line 22

def execute
  find_the_end
  remove_everything_else
end