Class: BuildMaster::TemplateBuilder
- Inherits:
-
Object
- Object
- BuildMaster::TemplateBuilder
- Defined in:
- lib/buildmaster/site/template_builder.rb
Instance Attribute Summary collapse
-
#contact_admin ⇒ Object
Returns the value of attribute contact_admin.
-
#css_path ⇒ Object
Returns the value of attribute css_path.
-
#logo ⇒ Object
readonly
Returns the value of attribute logo.
-
#menu_groups ⇒ Object
readonly
Returns the value of attribute menu_groups.
-
#news_rss ⇒ Object
Returns the value of attribute news_rss.
-
#title_header ⇒ Object
Returns the value of attribute title_header.
Instance Method Summary collapse
- #add_to_menu_groups ⇒ Object
- #content ⇒ Object
- #generate ⇒ Object
-
#initialize ⇒ TemplateBuilder
constructor
A new instance of TemplateBuilder.
- #left_bottom_logo ⇒ Object
- #menu_group(title, link = nil) ⇒ Object
- #releases ⇒ Object
Constructor Details
#initialize ⇒ TemplateBuilder
Returns a new instance of TemplateBuilder.
65 66 67 68 69 70 71 |
# File 'lib/buildmaster/site/template_builder.rb', line 65 def initialize @title_header = '' @css_path = 'buildmaster.css' @logo = Logo.new @menu_groups = Array.new @contact_admin = 'contact.html' end |
Instance Attribute Details
#contact_admin ⇒ Object
Returns the value of attribute contact_admin.
62 63 64 |
# File 'lib/buildmaster/site/template_builder.rb', line 62 def contact_admin @contact_admin end |
#css_path ⇒ Object
Returns the value of attribute css_path.
62 63 64 |
# File 'lib/buildmaster/site/template_builder.rb', line 62 def css_path @css_path end |
#logo ⇒ Object (readonly)
Returns the value of attribute logo.
63 64 65 |
# File 'lib/buildmaster/site/template_builder.rb', line 63 def logo @logo end |
#menu_groups ⇒ Object (readonly)
Returns the value of attribute menu_groups.
63 64 65 |
# File 'lib/buildmaster/site/template_builder.rb', line 63 def @menu_groups end |
#news_rss ⇒ Object
Returns the value of attribute news_rss.
62 63 64 |
# File 'lib/buildmaster/site/template_builder.rb', line 62 def news_rss @news_rss end |
#title_header ⇒ Object
Returns the value of attribute title_header.
62 63 64 |
# File 'lib/buildmaster/site/template_builder.rb', line 62 def title_header @title_header end |
Instance Method Details
#add_to_menu_groups ⇒ Object
73 74 75 76 77 |
# File 'lib/buildmaster/site/template_builder.rb', line 73 def group = MenuGroup.new('group', nil) .push(group) return group end |
#content ⇒ Object
103 104 105 |
# File 'lib/buildmaster/site/template_builder.rb', line 103 def content return load_template_content end |
#generate ⇒ Object
99 100 101 |
# File 'lib/buildmaster/site/template_builder.rb', line 99 def generate return load_template end |
#left_bottom_logo ⇒ Object
85 86 87 88 89 90 |
# File 'lib/buildmaster/site/template_builder.rb', line 85 def left_bottom_logo if (@left_bottom_logo.nil?) @left_bottom_logo = Logo.new end return @left_bottom_logo end |