Class: Headline
Instance Attribute Summary collapse
-
#level ⇒ Object
readonly
Returns the value of attribute level.
-
#max ⇒ Object
readonly
Returns the value of attribute max.
-
#min ⇒ Object
readonly
Returns the value of attribute min.
-
#period ⇒ Object
readonly
Returns the value of attribute period.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Headline
constructor
A new instance of Headline.
- #unwrapped_headline ⇒ Object
- #wrapped_headline ⇒ Object
Methods included from Lengthable
#length, #length_max, #length_min, #max_no_min?, #min_and_max?, #min_no_max?
Constructor Details
#initialize(options = {}) ⇒ Headline
Returns a new instance of Headline.
9 10 11 12 13 14 |
# File 'lib/ipsummer/headline.rb', line 9 def initialize(={}) @level = [:level] @min = [:min_words] @max = [:max_words] @period = [:period] || false end |
Instance Attribute Details
#level ⇒ Object (readonly)
Returns the value of attribute level.
7 8 9 |
# File 'lib/ipsummer/headline.rb', line 7 def level @level end |
#max ⇒ Object (readonly)
Returns the value of attribute max.
7 8 9 |
# File 'lib/ipsummer/headline.rb', line 7 def max @max end |
#min ⇒ Object (readonly)
Returns the value of attribute min.
7 8 9 |
# File 'lib/ipsummer/headline.rb', line 7 def min @min end |
#period ⇒ Object (readonly)
Returns the value of attribute period.
7 8 9 |
# File 'lib/ipsummer/headline.rb', line 7 def period @period end |
Instance Method Details
#unwrapped_headline ⇒ Object
20 21 22 |
# File 'lib/ipsummer/headline.rb', line 20 def unwrapped_headline complete_headline end |
#wrapped_headline ⇒ Object
16 17 18 |
# File 'lib/ipsummer/headline.rb', line 16 def wrapped_headline unescaped "<#{heading}>#{unwrapped_headline}</#{heading}>" end |