Module: Sunrise::Models::Header::InstanceMethods
- Defined in:
- lib/sunrise/models/header.rb
Instance Method Summary collapse
Instance Method Details
#empty? ⇒ Boolean
19 20 21 |
# File 'lib/sunrise/models/header.rb', line 19 def empty? [keywords, description, title].map(&:blank?).all? end |
#has_info? ⇒ Boolean
23 24 25 |
# File 'lib/sunrise/models/header.rb', line 23 def has_info? !empty? end |
#read(key) ⇒ Object
27 28 29 30 |
# File 'lib/sunrise/models/header.rb', line 27 def read(key) value = read_attribute(key) value.blank? ? nil : value end |