"Fossies" - the Fresh Open Source Software Archive

Member "asciidoctor-2.0.10/test/fixtures/tagged-class-enclosed.rb" (1 Jun 2019, 394 Bytes) of package /linux/www/asciidoctor-2.0.10.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Ruby source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #tag::all[]
    2 class Dog
    3   #tag::init[]
    4   def initialize breed
    5     @breed = breed
    6   end
    7   #end::init[]
    8   #tag::bark[]
    9 
   10   def bark
   11     #tag::bark-beagle[]
   12     if @breed == 'beagle'
   13       'woof woof woof woof woof'
   14     #end::bark-beagle[]
   15     #tag::bark-other[]
   16     else
   17       'woof woof'
   18     #end::bark-other[]
   19     #tag::bark-all[]
   20     end
   21     #end::bark-all[]
   22   end
   23   #end::bark[]
   24 end
   25 #end::all[]