Module: Writetheman::Article::Content
- Included in:
- Base
- Defined in:
- lib/writetheman/article/content.rb
Instance Attribute Summary collapse
-
#all_content ⇒ Object
Returns the value of attribute all_content.
-
#body ⇒ Object
Returns the value of attribute body.
-
#header ⇒ Object
Returns the value of attribute header.
-
#header_params ⇒ Object
Returns the value of attribute header_params.
-
#tags ⇒ Object
Returns the value of attribute tags.
Instance Method Summary collapse
Instance Attribute Details
#all_content ⇒ Object
Returns the value of attribute all_content.
5 6 7 |
# File 'lib/writetheman/article/content.rb', line 5 def all_content @all_content end |
#body ⇒ Object
Returns the value of attribute body.
5 6 7 |
# File 'lib/writetheman/article/content.rb', line 5 def body @body end |
#header ⇒ Object
Returns the value of attribute header.
5 6 7 |
# File 'lib/writetheman/article/content.rb', line 5 def header @header end |
#header_params ⇒ Object
Returns the value of attribute header_params.
5 6 7 |
# File 'lib/writetheman/article/content.rb', line 5 def header_params @header_params end |
#tags ⇒ Object
Returns the value of attribute tags.
5 6 7 |
# File 'lib/writetheman/article/content.rb', line 5 def @tags end |
Instance Method Details
#check_header_params_valid ⇒ Object
7 8 9 10 |
# File 'lib/writetheman/article/content.rb', line 7 def check_header_params_valid raise "title is empty in header params #{@header_params}" if !@header_params.include?('title') || @header_params['title'].empty? raise "date is empty in header params #{@header_params}" if !@header_params.include?('date') || @header_params['date'].empty? end |
#remove_content! ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/writetheman/article/content.rb', line 12 def remove_content! @all_content = '' @body = '' @header = '' @header_params = {} @tags = '' end |