Class: Nanoc::Helpers::Blogging::AtomFeedBuilder
- Inherits:
-
Object
- Object
- Nanoc::Helpers::Blogging::AtomFeedBuilder
- Includes:
- Nanoc::Helpers::Blogging
- Defined in:
- lib/nanoc/helpers/blogging.rb
Instance Attribute Summary collapse
-
#alt_link ⇒ Object
Returns the value of attribute alt_link.
-
#author_name ⇒ Object
Returns the value of attribute author_name.
-
#author_uri ⇒ Object
Returns the value of attribute author_uri.
-
#config ⇒ Object
Returns the value of attribute config.
-
#content_proc ⇒ Object
Returns the value of attribute content_proc.
-
#excerpt_proc ⇒ Object
Returns the value of attribute excerpt_proc.
-
#icon ⇒ Object
Returns the value of attribute icon.
-
#id ⇒ Object
Returns the value of attribute id.
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#logo ⇒ Object
Returns the value of attribute logo.
-
#preserve_order ⇒ Object
Returns the value of attribute preserve_order.
-
#relevant_articles ⇒ Object
Returns the value of attribute relevant_articles.
-
#title ⇒ Object
Returns the value of attribute title.
-
#title_proc ⇒ Object
Returns the value of attribute title_proc.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(config, item) ⇒ AtomFeedBuilder
constructor
A new instance of AtomFeedBuilder.
- #validate ⇒ Object
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.
46 47 48 49 |
# File 'lib/nanoc/helpers/blogging.rb', line 46 def initialize(config, item) @config = config @item = item end |
Instance Attribute Details
#alt_link ⇒ Object
Returns the value of attribute alt_link.
32 33 34 |
# File 'lib/nanoc/helpers/blogging.rb', line 32 def alt_link @alt_link end |
#author_name ⇒ Object
Returns the value of attribute author_name.
41 42 43 |
# File 'lib/nanoc/helpers/blogging.rb', line 41 def @author_name end |
#author_uri ⇒ Object
Returns the value of attribute author_uri.
42 43 44 |
# File 'lib/nanoc/helpers/blogging.rb', line 42 def @author_uri end |
#config ⇒ Object
Returns the value of attribute config.
30 31 32 |
# File 'lib/nanoc/helpers/blogging.rb', line 30 def config @config end |
#content_proc ⇒ Object
Returns the value of attribute content_proc.
37 38 39 |
# File 'lib/nanoc/helpers/blogging.rb', line 37 def content_proc @content_proc end |
#excerpt_proc ⇒ Object
Returns the value of attribute excerpt_proc.
38 39 40 |
# File 'lib/nanoc/helpers/blogging.rb', line 38 def excerpt_proc @excerpt_proc end |
#icon ⇒ Object
Returns the value of attribute icon.
43 44 45 |
# File 'lib/nanoc/helpers/blogging.rb', line 43 def icon @icon end |
#id ⇒ Object
Returns the value of attribute id.
33 34 35 |
# File 'lib/nanoc/helpers/blogging.rb', line 33 def id @id end |
#limit ⇒ Object
Returns the value of attribute limit.
34 35 36 |
# File 'lib/nanoc/helpers/blogging.rb', line 34 def limit @limit end |
#logo ⇒ Object
Returns the value of attribute logo.
44 45 46 |
# File 'lib/nanoc/helpers/blogging.rb', line 44 def logo @logo end |
#preserve_order ⇒ Object
Returns the value of attribute preserve_order.
36 37 38 |
# File 'lib/nanoc/helpers/blogging.rb', line 36 def preserve_order @preserve_order end |
#relevant_articles ⇒ Object
Returns the value of attribute relevant_articles.
35 36 37 |
# File 'lib/nanoc/helpers/blogging.rb', line 35 def relevant_articles @relevant_articles end |
#title ⇒ Object
Returns the value of attribute title.
40 41 42 |
# File 'lib/nanoc/helpers/blogging.rb', line 40 def title @title end |
#title_proc ⇒ Object
Returns the value of attribute title_proc.
39 40 41 |
# File 'lib/nanoc/helpers/blogging.rb', line 39 def title_proc @title_proc end |
Instance Method Details
#build ⇒ Object
57 58 59 60 61 62 |
# File 'lib/nanoc/helpers/blogging.rb', line 57 def build buffer = +'' xml = Builder::XmlMarkup.new(target: buffer, indent: 2) build_for_feed(xml) buffer end |
#validate ⇒ Object
51 52 53 54 55 |
# File 'lib/nanoc/helpers/blogging.rb', line 51 def validate validate_config validate_feed_item validate_articles end |