Module: Ksk::Post
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/actives/post.rb
Instance Method Summary collapse
- #apdown_text ⇒ Object
- #content_has_more? ⇒ Boolean
- #content_long ⇒ Object
- #content_short ⇒ Object
- #hidden_text ⇒ Object
- #intro ⇒ Object
- #split_content ⇒ Object
Instance Method Details
#apdown_text ⇒ Object
20 21 22 |
# File 'lib/actives/post.rb', line 20 def apdown_text content end |
#content_has_more? ⇒ Boolean
45 46 47 |
# File 'lib/actives/post.rb', line 45 def content_has_more? !hidden_text.blank? end |
#content_long ⇒ Object
24 25 26 |
# File 'lib/actives/post.rb', line 24 def content_long "#{intro} #{hidden_text}" end |
#content_short ⇒ Object
28 29 30 |
# File 'lib/actives/post.rb', line 28 def content_short intro end |
#hidden_text ⇒ Object
36 37 38 |
# File 'lib/actives/post.rb', line 36 def hidden_text split_content[1] end |
#intro ⇒ Object
32 33 34 |
# File 'lib/actives/post.rb', line 32 def intro split_content[0] end |
#split_content ⇒ Object
40 41 42 43 |
# File 'lib/actives/post.rb', line 40 def split_content return [] if read_attribute(:content).blank? read_attribute(:content).split('@@@') end |