Module: TDiary::Style::BaseSection
- Defined in:
- lib/tdiary/style.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
Returns the value of attribute author.
-
#body_to_html ⇒ Object
readonly
Returns the value of attribute body_to_html.
-
#categories ⇒ Object
readonly
Returns the value of attribute categories.
-
#stripped_subtitle ⇒ Object
readonly
Returns the value of attribute stripped_subtitle.
-
#stripped_subtitle_to_html ⇒ Object
readonly
Returns the value of attribute stripped_subtitle_to_html.
-
#subtitle ⇒ Object
readonly
Returns the value of attribute subtitle.
-
#subtitle_to_html ⇒ Object
readonly
Returns the value of attribute subtitle_to_html.
Instance Method Summary collapse
- #body ⇒ Object
- #body=(str) ⇒ Object
- #categories_to_string ⇒ Object
- #chtml(date, idx, opt) ⇒ Object
- #html4(date, idx, opt) ⇒ Object
- #to_s ⇒ Object
Instance Attribute Details
#author ⇒ Object (readonly)
Returns the value of attribute author.
11 12 13 |
# File 'lib/tdiary/style.rb', line 11 def @author end |
#body_to_html ⇒ Object (readonly)
Returns the value of attribute body_to_html.
13 14 15 |
# File 'lib/tdiary/style.rb', line 13 def body_to_html @body_to_html end |
#categories ⇒ Object (readonly)
Returns the value of attribute categories.
12 13 14 |
# File 'lib/tdiary/style.rb', line 12 def categories @categories end |
#stripped_subtitle ⇒ Object (readonly)
Returns the value of attribute stripped_subtitle.
12 13 14 |
# File 'lib/tdiary/style.rb', line 12 def stripped_subtitle @stripped_subtitle end |
#stripped_subtitle_to_html ⇒ Object (readonly)
Returns the value of attribute stripped_subtitle_to_html.
13 14 15 |
# File 'lib/tdiary/style.rb', line 13 def stripped_subtitle_to_html @stripped_subtitle_to_html end |
#subtitle ⇒ Object (readonly)
Returns the value of attribute subtitle.
11 12 13 |
# File 'lib/tdiary/style.rb', line 11 def subtitle @subtitle end |
#subtitle_to_html ⇒ Object (readonly)
Returns the value of attribute subtitle_to_html.
13 14 15 |
# File 'lib/tdiary/style.rb', line 13 def subtitle_to_html @subtitle_to_html end |
Instance Method Details
#body ⇒ Object
15 16 17 |
# File 'lib/tdiary/style.rb', line 15 def body @body.dup end |
#body=(str) ⇒ Object
19 20 21 |
# File 'lib/tdiary/style.rb', line 19 def body=(str) @body = str end |
#categories_to_string ⇒ Object
41 42 43 44 45 46 |
# File 'lib/tdiary/style.rb', line 41 def categories_to_string @categories = categories cat_str = "" categories.each {|cat| cat_str << "[#{cat}]"} cat_str << " " unless cat_str.empty? end |
#chtml(date, idx, opt) ⇒ Object
31 32 33 34 35 |
# File 'lib/tdiary/style.rb', line 31 def chtml(date, idx, opt) r = %Q[<%=section_enter_proc( Time.at( #{date.to_i} ) )%>\n] r << do_html4( date, idx, opt ) r << %Q[<%=section_leave_proc( Time.at( #{date.to_i} ) )%>\n] end |
#html4(date, idx, opt) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/tdiary/style.rb', line 23 def html4(date, idx, opt) r = %Q[<div class="section">\n] r << %Q[<%=section_enter_proc( Time.at( #{date.to_i} ) )%>\n] r << do_html4( date, idx, opt ) r << %Q[<%=section_leave_proc( Time.at( #{date.to_i} ) )%>\n] r << "</div>\n" end |
#to_s ⇒ Object
37 38 39 |
# File 'lib/tdiary/style.rb', line 37 def to_s to_src end |