Class: AtomFeed::AtomPerson

Inherits:
Object show all
Defined in:
lib/atom_feed/atom_person.rb

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ AtomPerson

Initializes the person.



4
5
6
# File 'lib/atom_feed/atom_person.rb', line 4

def initialize(node)
  @node = node
end

Instance Method Details

#emailObject

Email address of the person (optional)



19
20
21
# File 'lib/atom_feed/atom_person.rb', line 19

def email
  @node.at_xpath("atom:email", ::AtomFeed::NS).try(:content)
end

#nameObject

Human readable name of the person (required)



9
10
11
# File 'lib/atom_feed/atom_person.rb', line 9

def name
  @node.at_xpath("atom:name", ::AtomFeed::NS).content
end

#uriObject

Home page for the person (optional)



14
15
16
# File 'lib/atom_feed/atom_person.rb', line 14

def uri
  @node.at_xpath("atom:uri", ::AtomFeed::NS).try(:content)
end