Class: BodyTypeRefiner

Inherits:
TypeRefiner show all
Defined in:
lib/notroff/type_refiner.rb

Instance Method Summary collapse

Methods inherited from TypeRefiner

#next_paragraph_type, #previous_paragraph_type, #process

Instance Method Details

#type_for(previous_type, type, next_type) ⇒ Object



64
65
66
67
68
69
70
71
72
73
74
# File 'lib/notroff/type_refiner.rb', line 64

def type_for( previous_type, type, next_type )
  Logger.log "body type for [#{previous_type}] [#{type}] [#{next_type}]"

  new_type = type
  if (type == :body) and (previous_type == :body)
    new_type = :body2
  end

  Logger.log("new type: #{new_type}")
  new_type
end