Class: Wacky::ExtractsTitle
- Inherits:
-
Object
- Object
- Wacky::ExtractsTitle
- Defined in:
- app/models/wacky/extracts_title.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
readonly
Returns the value of attribute doc.
Instance Method Summary collapse
-
#initialize(doc) ⇒ ExtractsTitle
constructor
A new instance of ExtractsTitle.
- #title ⇒ Object
Constructor Details
#initialize(doc) ⇒ ExtractsTitle
Returns a new instance of ExtractsTitle.
7 8 9 |
# File 'app/models/wacky/extracts_title.rb', line 7 def initialize(doc) @doc = doc end |
Instance Attribute Details
#doc ⇒ Object (readonly)
Returns the value of attribute doc.
5 6 7 |
# File 'app/models/wacky/extracts_title.rb', line 5 def doc @doc end |
Instance Method Details
#title ⇒ Object
11 12 13 |
# File 'app/models/wacky/extracts_title.rb', line 11 def title matching_title ? matching_title.text : nil end |