Class: Nanoc::Helpers::Blogging::AtomFeedBuilder

Inherits:
Object
  • Object
show all
Includes:
Nanoc::Helpers::Blogging
Defined in:
lib/nanoc/helpers/blogging.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Nanoc::Helpers::Blogging

#articles, #atom_feed, #atom_tag_for, #attribute_to_time, #feed_url, #sorted_articles, #url_for

Constructor Details

#initialize(config, item) ⇒ AtomFeedBuilder

Returns a new instance of AtomFeedBuilder



41
42
43
44
# File 'lib/nanoc/helpers/blogging.rb', line 41

def initialize(config, item)
  @config = config
  @item = item
end

Instance Attribute Details

#author_nameObject

Returns the value of attribute author_name



36
37
38
# File 'lib/nanoc/helpers/blogging.rb', line 36

def author_name
  @author_name
end

#author_uriObject

Returns the value of attribute author_uri



37
38
39
# File 'lib/nanoc/helpers/blogging.rb', line 37

def author_uri
  @author_uri
end

#configObject

Returns the value of attribute config



28
29
30
# File 'lib/nanoc/helpers/blogging.rb', line 28

def config
  @config
end

#content_procObject

Returns the value of attribute content_proc



33
34
35
# File 'lib/nanoc/helpers/blogging.rb', line 33

def content_proc
  @content_proc
end

#excerpt_procObject

Returns the value of attribute excerpt_proc



34
35
36
# File 'lib/nanoc/helpers/blogging.rb', line 34

def excerpt_proc
  @excerpt_proc
end

#iconObject

Returns the value of attribute icon



38
39
40
# File 'lib/nanoc/helpers/blogging.rb', line 38

def icon
  @icon
end

#limitObject

Returns the value of attribute limit



30
31
32
# File 'lib/nanoc/helpers/blogging.rb', line 30

def limit
  @limit
end

#logoObject

Returns the value of attribute logo



39
40
41
# File 'lib/nanoc/helpers/blogging.rb', line 39

def 
  @logo
end

#preserve_orderObject

Returns the value of attribute preserve_order



32
33
34
# File 'lib/nanoc/helpers/blogging.rb', line 32

def preserve_order
  @preserve_order
end

#relevant_articlesObject

Returns the value of attribute relevant_articles



31
32
33
# File 'lib/nanoc/helpers/blogging.rb', line 31

def relevant_articles
  @relevant_articles
end

#titleObject

Returns the value of attribute title



35
36
37
# File 'lib/nanoc/helpers/blogging.rb', line 35

def title
  @title
end

Instance Method Details

#buildObject



52
53
54
55
56
57
# File 'lib/nanoc/helpers/blogging.rb', line 52

def build
  buffer = ''
  xml = Builder::XmlMarkup.new(target: buffer, indent: 2)
  build_for_feed(xml)
  buffer
end

#validateObject



46
47
48
49
50
# File 'lib/nanoc/helpers/blogging.rb', line 46

def validate
  validate_config
  validate_feed_item
  validate_articles
end