Class: WeeklyplannerTemplate
- Inherits:
-
PlannerTemplate
- Object
- PlannerTemplate
- WeeklyplannerTemplate
- Defined in:
- lib/weeklyplanner_template.rb
Instance Attribute Summary collapse
-
#no ⇒ Object
readonly
Returns the value of attribute no.
Instance Method Summary collapse
-
#initialize(src, template: 'default') ⇒ WeeklyplannerTemplate
constructor
A new instance of WeeklyplannerTemplate.
- #to_h ⇒ Object
Constructor Details
#initialize(src, template: 'default') ⇒ WeeklyplannerTemplate
Returns a new instance of WeeklyplannerTemplate.
13 14 15 16 17 18 19 |
# File 'lib/weeklyplanner_template.rb', line 13 def initialize(src, template: 'default') super(src, template: template) @no = @xmldoc.root.text('summary/no') @template = 'landscape1' if @template == 'default' end |
Instance Attribute Details
#no ⇒ Object (readonly)
Returns the value of attribute no.
11 12 13 |
# File 'lib/weeklyplanner_template.rb', line 11 def no @no end |
Instance Method Details
#to_h ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/weeklyplanner_template.rb', line 21 def to_h() layout, style = fetch_css { 'week' + @no + '_planner.html' => self.to_html, 'week_layout.css' => layout, 'week.css' => style } end |