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.
9 10 11 |
# File 'lib/tdiary/style.rb', line 9 def @author end |
#body_to_html ⇒ Object (readonly)
Returns the value of attribute body_to_html.
11 12 13 |
# File 'lib/tdiary/style.rb', line 11 def body_to_html @body_to_html end |
#categories ⇒ Object (readonly)
Returns the value of attribute categories.
10 11 12 |
# File 'lib/tdiary/style.rb', line 10 def categories @categories end |
#stripped_subtitle ⇒ Object (readonly)
Returns the value of attribute stripped_subtitle.
10 11 12 |
# File 'lib/tdiary/style.rb', line 10 def stripped_subtitle @stripped_subtitle end |
#stripped_subtitle_to_html ⇒ Object (readonly)
Returns the value of attribute stripped_subtitle_to_html.
11 12 13 |
# File 'lib/tdiary/style.rb', line 11 def stripped_subtitle_to_html @stripped_subtitle_to_html end |
#subtitle ⇒ Object (readonly)
Returns the value of attribute subtitle.
9 10 11 |
# File 'lib/tdiary/style.rb', line 9 def subtitle @subtitle end |
#subtitle_to_html ⇒ Object (readonly)
Returns the value of attribute subtitle_to_html.
11 12 13 |
# File 'lib/tdiary/style.rb', line 11 def subtitle_to_html @subtitle_to_html end |
Instance Method Details
#body ⇒ Object
13 14 15 |
# File 'lib/tdiary/style.rb', line 13 def body @body.dup end |
#body=(str) ⇒ Object
17 18 19 |
# File 'lib/tdiary/style.rb', line 17 def body=(str) @body = str end |
#categories_to_string ⇒ Object
39 40 41 42 43 44 |
# File 'lib/tdiary/style.rb', line 39 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
29 30 31 32 33 |
# File 'lib/tdiary/style.rb', line 29 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
21 22 23 24 25 26 27 |
# File 'lib/tdiary/style.rb', line 21 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
35 36 37 |
# File 'lib/tdiary/style.rb', line 35 def to_s to_src end |