Class: Perron::Site::Builder::Feeds::Author::Author

Inherits:
Object
  • Object
show all
Defined in:
lib/perron/site/builder/feeds/author.rb

Instance Method Summary collapse

Constructor Details

#initialize(author) ⇒ Author

Returns a new instance of Author.



18
19
20
# File 'lib/perron/site/builder/feeds/author.rb', line 18

def initialize(author)
  @author = author
end

Instance Method Details

#avatarObject



34
35
36
# File 'lib/perron/site/builder/feeds/author.rb', line 34

def avatar
  @author.respond_to?(:metadata) ? @author..avatar : @author[:avatar]
end

#emailObject



26
27
28
# File 'lib/perron/site/builder/feeds/author.rb', line 26

def email
  @author.respond_to?(:metadata) ? @author..email : @author[:email]
end

#nameObject



22
23
24
# File 'lib/perron/site/builder/feeds/author.rb', line 22

def name
  @author.respond_to?(:metadata) ? @author..name : @author[:name]
end

#urlObject



30
31
32
# File 'lib/perron/site/builder/feeds/author.rb', line 30

def url
  @author.respond_to?(:metadata) ? @author..url : @author[:url]
end