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
-
#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.
-
#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.
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
66 67 68 69 |
# File 'lib/nanoc/helpers/blogging.rb', line 66 def initialize(config, item) @config = config @item = item end |
Instance Attribute Details
#author_name ⇒ Object
Returns the value of attribute author_name
61 62 63 |
# File 'lib/nanoc/helpers/blogging.rb', line 61 def @author_name end |
#author_uri ⇒ Object
Returns the value of attribute author_uri
62 63 64 |
# File 'lib/nanoc/helpers/blogging.rb', line 62 def @author_uri end |
#config ⇒ Object
Returns the value of attribute config
53 54 55 |
# File 'lib/nanoc/helpers/blogging.rb', line 53 def config @config end |
#content_proc ⇒ Object
Returns the value of attribute content_proc
58 59 60 |
# File 'lib/nanoc/helpers/blogging.rb', line 58 def content_proc @content_proc end |
#excerpt_proc ⇒ Object
Returns the value of attribute excerpt_proc
59 60 61 |
# File 'lib/nanoc/helpers/blogging.rb', line 59 def excerpt_proc @excerpt_proc end |
#icon ⇒ Object
Returns the value of attribute icon
63 64 65 |
# File 'lib/nanoc/helpers/blogging.rb', line 63 def icon @icon end |
#limit ⇒ Object
Returns the value of attribute limit
55 56 57 |
# File 'lib/nanoc/helpers/blogging.rb', line 55 def limit @limit end |
#logo ⇒ Object
Returns the value of attribute logo
64 65 66 |
# File 'lib/nanoc/helpers/blogging.rb', line 64 def logo @logo end |
#preserve_order ⇒ Object
Returns the value of attribute preserve_order
57 58 59 |
# File 'lib/nanoc/helpers/blogging.rb', line 57 def preserve_order @preserve_order end |
#relevant_articles ⇒ Object
Returns the value of attribute relevant_articles
56 57 58 |
# File 'lib/nanoc/helpers/blogging.rb', line 56 def relevant_articles @relevant_articles end |
#title ⇒ Object
Returns the value of attribute title
60 61 62 |
# File 'lib/nanoc/helpers/blogging.rb', line 60 def title @title end |
Instance Method Details
#build ⇒ Object
77 78 79 80 81 82 |
# File 'lib/nanoc/helpers/blogging.rb', line 77 def build buffer = '' xml = Builder::XmlMarkup.new(target: buffer, indent: 2) build_for_feed(xml) buffer end |
#validate ⇒ Object
71 72 73 74 75 |
# File 'lib/nanoc/helpers/blogging.rb', line 71 def validate validate_config validate_feed_item validate_articles end |