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
13 14 15 16 17 18 19 20 21 22 |
# 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' lib = File.dirname(__FILE__) @template = File.join(lib, '..', 'template', template) 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
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/weeklyplanner_template.rb', line 24 def to_h() layout, style = fetch_css { 'week' + @no + '_planner.html' => self.to_html, 'week_layout.css' => layout, 'week.css' => style } end |