Class: Lifer::Builder::HTML::FromLiquid::Drops::AuthorDrop

Inherits:
Liquid::Drop
  • Object
show all
Defined in:
lib/lifer/builder/html/from_liquid/drops/authors_drop.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lifer_author) ⇒ AuthorDrop

Returns a new instance of AuthorDrop.



5
# File 'lib/lifer/builder/html/from_liquid/drops/authors_drop.rb', line 5

def initialize(lifer_author) = (@lifer_author = lifer_author)

Instance Attribute Details

#lifer_authorObject

Returns the value of attribute lifer_author.



3
4
5
# File 'lib/lifer/builder/html/from_liquid/drops/authors_drop.rb', line 3

def lifer_author
  @lifer_author
end

Instance Method Details

#avatarObject



7
# File 'lib/lifer/builder/html/from_liquid/drops/authors_drop.rb', line 7

def avatar = (@avatar ||= lifer_author.avatar)

#entriesObject



13
14
15
16
17
# File 'lib/lifer/builder/html/from_liquid/drops/authors_drop.rb', line 13

def entries
  @entries ||= lifer_author.entries.map {
    EntryDrop.new _1, collection: _1.collection, tags: _1.tags
  }
end

#nameObject



9
# File 'lib/lifer/builder/html/from_liquid/drops/authors_drop.rb', line 9

def name = (@name ||= lifer_author.name)

#urlObject



11
# File 'lib/lifer/builder/html/from_liquid/drops/authors_drop.rb', line 11

def url = (@url ||= lifer_author.url)