Class: FeedMe::Rss2PersonParser

Inherits:
PersonParser show all
Defined in:
lib/feed_me/person_parser.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractParser

#feed, #xml

Instance Method Summary collapse

Methods inherited from AbstractParser

has_many, has_one, #initialize, properties, property, #to_hash

Constructor Details

This class inherits a constructor from FeedMe::AbstractParser

Instance Attribute Details

#uriObject (readonly)

Returns the value of attribute uri.



12
13
14
# File 'lib/feed_me/person_parser.rb', line 12

def uri
  @uri
end

Instance Method Details

#emailObject



14
15
16
# File 'lib/feed_me/person_parser.rb', line 14

def email
  xml.text.split(/\s+/, 2)[0] if xml
end

#nameObject



18
19
20
# File 'lib/feed_me/person_parser.rb', line 18

def name
  xml.text.split(/\s+/, 2)[1].to_s[/\((.*?)\)/, 1] if xml
end