Module: Element

Included in:
Nokogiri::XML::Element
Defined in:
lib/ext/element.rb

Instance Method Summary collapse

Instance Method Details

#dateObject



14
15
16
17
18
19
# File 'lib/ext/element.rb', line 14

def date
  begin
    DateTime.parse(date_str)
  rescue
  end
end

#date_strObject



10
11
12
# File 'lib/ext/element.rb', line 10

def date_str
  at("dc|date").content
end

#titleObject



2
3
4
# File 'lib/ext/element.rb', line 2

def title
  at("title").content
end

#urlObject



6
7
8
# File 'lib/ext/element.rb', line 6

def url
  self["about"].strip_http
end