Class: Alchemy::EssenceHeadline

Inherits:
BaseRecord
  • Object
show all
Defined in:
app/models/alchemy/essence_headline.rb

Instance Method Summary collapse

Instance Method Details

#level_optionsObject


13
14
15
# File 'app/models/alchemy/essence_headline.rb', line 13

def level_options
  levels.map { |level| ["H#{level}", level] }
end

#preview_text(maxlength = 30) ⇒ Object


9
10
11
# File 'app/models/alchemy/essence_headline.rb', line 9

def preview_text(maxlength = 30)
  "H#{level}: #{body}"[0..maxlength - 1]
end

#size_optionsObject


17
18
19
# File 'app/models/alchemy/essence_headline.rb', line 17

def size_options
  sizes.map { |size| ["H#{size}", size] }
end