Class: Wacky::ExtractsTitle

Inherits:
Object
  • Object
show all
Defined in:
app/models/wacky/extracts_title.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#docObject (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

#titleObject



11
12
13
# File 'app/models/wacky/extracts_title.rb', line 11

def title
  matching_title ? matching_title.text : nil
end