Method: Eggshell::Bundles::Basic::ListBlocks#can_handle
- Defined in:
- lib/eggshell/bundles/basics.rb
#can_handle(line) ⇒ Object
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 |
# File 'lib/eggshell/bundles/basics.rb', line 346 def can_handle(line) match = START_LIST.match(line) if match @block_type = match[1] return BH::COLLECT end match = START_LIST_SHORT.match(line) if match if match[1] == '>' @block_type = 'dl' else @block_type = match[1] == '-' ? 'ul' : 'ol' end return BH::COLLECT end return BH::RETRY end |