Class: SiSU_Param_Make::MakeHead
- Inherits:
-
Object
- Object
- SiSU_Param_Make::MakeHead
- Defined in:
- lib/sisu/dp_make.rb
Instance Attribute Summary collapse
-
#bold_match_list ⇒ Object
Returns the value of attribute bold_match_list.
-
#cover_image ⇒ Object
Returns the value of attribute cover_image.
-
#emphasis_set_to ⇒ Object
Returns the value of attribute emphasis_set_to.
-
#footer_links ⇒ Object
Returns the value of attribute footer_links.
-
#home_button_image ⇒ Object
Returns the value of attribute home_button_image.
-
#home_button_links ⇒ Object
Returns the value of attribute home_button_links.
-
#i18n ⇒ Object
Returns the value of attribute i18n.
-
#italics_match_list ⇒ Object
Returns the value of attribute italics_match_list.
-
#lv1 ⇒ Object
Returns the value of attribute lv1.
-
#lv2 ⇒ Object
Returns the value of attribute lv2.
-
#lv3 ⇒ Object
Returns the value of attribute lv3.
-
#lv4 ⇒ Object
Returns the value of attribute lv4.
-
#lv5 ⇒ Object
Returns the value of attribute lv5.
-
#lv6 ⇒ Object
Returns the value of attribute lv6.
-
#man_section ⇒ Object
Returns the value of attribute man_section.
-
#num_top ⇒ Object
Returns the value of attribute num_top.
-
#pagebreak ⇒ Object
Returns the value of attribute pagebreak.
-
#pageline ⇒ Object
Returns the value of attribute pageline.
-
#pagenew ⇒ Object
Returns the value of attribute pagenew.
-
#substitution_match_list ⇒ Object
Returns the value of attribute substitution_match_list.
-
#toc ⇒ Object
Returns the value of attribute toc.
Instance Method Summary collapse
- #clear ⇒ Object
-
#initialize(make) ⇒ MakeHead
constructor
A new instance of MakeHead.
- #make_instruct ⇒ Object
Constructor Details
#initialize(make) ⇒ MakeHead
Returns a new instance of MakeHead.
541 542 543 |
# File 'lib/sisu/dp_make.rb', line 541 def initialize(make) @make=make end |
Instance Attribute Details
#bold_match_list ⇒ Object
Returns the value of attribute bold_match_list.
540 541 542 |
# File 'lib/sisu/dp_make.rb', line 540 def bold_match_list @bold_match_list end |
#cover_image ⇒ Object
Returns the value of attribute cover_image.
540 541 542 |
# File 'lib/sisu/dp_make.rb', line 540 def cover_image @cover_image end |
#emphasis_set_to ⇒ Object
Returns the value of attribute emphasis_set_to.
540 541 542 |
# File 'lib/sisu/dp_make.rb', line 540 def emphasis_set_to @emphasis_set_to end |
#footer_links ⇒ Object
Returns the value of attribute footer_links.
540 541 542 |
# File 'lib/sisu/dp_make.rb', line 540 def @footer_links end |
#home_button_image ⇒ Object
Returns the value of attribute home_button_image.
540 541 542 |
# File 'lib/sisu/dp_make.rb', line 540 def @home_button_image end |
#home_button_links ⇒ Object
Returns the value of attribute home_button_links.
540 541 542 |
# File 'lib/sisu/dp_make.rb', line 540 def @home_button_links end |
#i18n ⇒ Object
Returns the value of attribute i18n.
540 541 542 |
# File 'lib/sisu/dp_make.rb', line 540 def i18n @i18n end |
#italics_match_list ⇒ Object
Returns the value of attribute italics_match_list.
540 541 542 |
# File 'lib/sisu/dp_make.rb', line 540 def italics_match_list @italics_match_list end |
#lv1 ⇒ Object
Returns the value of attribute lv1.
540 541 542 |
# File 'lib/sisu/dp_make.rb', line 540 def lv1 @lv1 end |
#lv2 ⇒ Object
Returns the value of attribute lv2.
540 541 542 |
# File 'lib/sisu/dp_make.rb', line 540 def lv2 @lv2 end |
#lv3 ⇒ Object
Returns the value of attribute lv3.
540 541 542 |
# File 'lib/sisu/dp_make.rb', line 540 def lv3 @lv3 end |
#lv4 ⇒ Object
Returns the value of attribute lv4.
540 541 542 |
# File 'lib/sisu/dp_make.rb', line 540 def lv4 @lv4 end |
#lv5 ⇒ Object
Returns the value of attribute lv5.
540 541 542 |
# File 'lib/sisu/dp_make.rb', line 540 def lv5 @lv5 end |
#lv6 ⇒ Object
Returns the value of attribute lv6.
540 541 542 |
# File 'lib/sisu/dp_make.rb', line 540 def lv6 @lv6 end |
#man_section ⇒ Object
Returns the value of attribute man_section.
540 541 542 |
# File 'lib/sisu/dp_make.rb', line 540 def man_section @man_section end |
#num_top ⇒ Object
Returns the value of attribute num_top.
540 541 542 |
# File 'lib/sisu/dp_make.rb', line 540 def num_top @num_top end |
#pagebreak ⇒ Object
Returns the value of attribute pagebreak.
540 541 542 |
# File 'lib/sisu/dp_make.rb', line 540 def pagebreak @pagebreak end |
#pageline ⇒ Object
Returns the value of attribute pageline.
540 541 542 |
# File 'lib/sisu/dp_make.rb', line 540 def pageline @pageline end |
#pagenew ⇒ Object
Returns the value of attribute pagenew.
540 541 542 |
# File 'lib/sisu/dp_make.rb', line 540 def pagenew @pagenew end |
#substitution_match_list ⇒ Object
Returns the value of attribute substitution_match_list.
540 541 542 |
# File 'lib/sisu/dp_make.rb', line 540 def substitution_match_list @substitution_match_list end |
#toc ⇒ Object
Returns the value of attribute toc.
540 541 542 |
# File 'lib/sisu/dp_make.rb', line 540 def toc @toc end |
Instance Method Details
#clear ⇒ Object
544 545 546 |
# File 'lib/sisu/dp_make.rb', line 544 def clear @pagenew=@pagebreak=@pageline=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@num_top=@i18n=@man_section=@footer_links=@substitution_match_list=@bold_match_list=@italics_match_list=@emphasis_set_to=@home_button_links=@home_button_image=@cover_image=nil end |
#make_instruct ⇒ Object
547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 |
# File 'lib/sisu/dp_make.rb', line 547 def make_instruct clear if defined? @make.breaks \ and @make.breaks[:page_new] #clearpage @pagenew=@make.breaks[:page_new] end if defined? @make.breaks \ and @make.breaks[:page_break] #newpage @pagebreak=@make.breaks[:page_break] end if defined? @make.breaks \ and @make.breaks[:page_line] #page line across @pagebreak=@make.breaks[:page_line] end if defined? @make.headings \ and @make.headings @toc=@make.headings[0] @lv1=@make.headings[1] @lv2=@make.headings[2] @lv3=@make.headings[3] @lv4=@make.headings[4] @lv5=@make.headings[5] @lv6=@make.headings[6] end if defined? @make.num_top \ and @make.num_top @num_top=@make.num_top # remove @num_top end if defined? @make.language \ and @make.language[0] @i18n=@make.language end if defined? @make.manpage \ and @make.manpage @man_section=(defined? @make.manpage.section) \ ? @make.manpage.section : 1 end if defined? @make.substitute \ and @make.substitute @substitution_match_list=@make.substitute end if defined? @make.bold \ and @make.bold @bold_match_list=@make.bold end if defined? @make.italics \ and @make.italics @italics_match_list=@make.italics end if defined? @make.emphasis \ and @make.emphasis @emphasis_set_to=@make.emphasis end if defined? @make. \ and @make..is_a?(Array) @footer_links= { left: { say: '', url: '' }, center: { say: '', url: '' } } #already set @footer_links[:left]=if @make.[0]=~/\{.+?\}(?:(?:https?|file|ftp):\/|\.\.)\/\S+(?:\s|$)/ say,url=/\{\s*(.+?)\s*\}((?:(?:https?|file|ftp):\/|\.\.)\/\S+)/im.match(@make.[0])[1,2] { say: say, url: url } else { say: '', url: '' } end @footer_links[:center]=if @make.[1]=~/\{.+?\}(?:(?:https?|file|ftp):\/|\.\.)\/\S+(?:\s|$)/ say,url=/\{\s*(.+?)\s*\}((?:(?:https?|file|ftp):\/|\.\.)\/\S+)/im.match(@make.[1])[1,2] { say: say, url: url } else { say: '', url: '' } end @footer_links else #already set @footer_links= { left: { say: '', url: '' }, center: { say: '', url: '' } } end if defined? @make. \ and @make..is_a?(Array) a_idx=0 @home_button_links=[] @make..each do |doc_link| if doc_link=~/\{.+?\}(?:(?:https?|file|ftp):\/|\.\.)\/\S+(?:\s|$)/ say,url=/\{\s*(.+?)\s*\}((?:(?:https?|file|ftp):\/|\.\.)\/\S+)/im.match(doc_link)[1,2] @home_button_links[a_idx]= { say: say, url: url } a_idx +=1 end end @home_button_links end if defined? @make. \ and @make..is_a?(Hash) @home_button_image=@make. end if defined? @make.cover_image \ and @make.cover_image.is_a?(Hash) @cover_image=@make.cover_image end { pagenew: @pagenew, pagebreak: @pagebreak, pageline: @pageline, toc: @toc, lv1: @lv1, lv2: @lv2, lv3: @lv3, lv4: @lv4, lv5: @lv5, lv6: @lv6, num_top: @num_top, i18n: @i18n, emphasis_set_to: @emphasis_set_to, bold_match_list: @bold_match_list, italics_match_list: @italics_match_list, substitution_match_list: @substitution_match_list, man_section: @man_section, footer_links: @footer_links, home_button_links: @home_button_links, home_button_image: @home_button_image, cover_image: @cover_image, } end |