Module: Rrant::Helper
Instance Method Summary collapse
Instance Method Details
#bill ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/rrant/helper.rb', line 11 def bill { 'text' => '80 rants should be enough.', 'image' => "#{files_path}/bill.jpg", 'score' => 80, 'user_username' => 'Bill' } end |
#files_path ⇒ Object
7 8 9 |
# File 'lib/rrant/helper.rb', line 7 def files_path File.('../../files/', File.dirname(__FILE__)) end |
#image_blank?(rant) ⇒ Boolean
3 4 5 |
# File 'lib/rrant/helper.rb', line 3 def image_blank?(rant) rant['attached_image'].nil? || rant['attached_image'] == '' end |