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

- (AtomFeedBuilder) initialize(site, item)

Returns a new instance of AtomFeedBuilder



68
69
70
71
# File 'lib/nanoc/helpers/blogging.rb', line 68

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

Instance Attribute Details

- (Object) author_name

Returns the value of attribute author_name



63
64
65
# File 'lib/nanoc/helpers/blogging.rb', line 63

def author_name
  @author_name
end

- (Object) author_uri

Returns the value of attribute author_uri



64
65
66
# File 'lib/nanoc/helpers/blogging.rb', line 64

def author_uri
  @author_uri
end

- (Object) content_proc

Returns the value of attribute content_proc



60
61
62
# File 'lib/nanoc/helpers/blogging.rb', line 60

def content_proc
  @content_proc
end

- (Object) excerpt_proc

Returns the value of attribute excerpt_proc



61
62
63
# File 'lib/nanoc/helpers/blogging.rb', line 61

def excerpt_proc
  @excerpt_proc
end

- (Object) icon

Returns the value of attribute icon



65
66
67
# File 'lib/nanoc/helpers/blogging.rb', line 65

def icon
  @icon
end

- (Object) limit

Returns the value of attribute limit



57
58
59
# File 'lib/nanoc/helpers/blogging.rb', line 57

def limit
  @limit
end

- (Object) logo

Returns the value of attribute logo



66
67
68
# File 'lib/nanoc/helpers/blogging.rb', line 66

def 
  @logo
end

- (Object) preserve_order

Returns the value of attribute preserve_order



59
60
61
# File 'lib/nanoc/helpers/blogging.rb', line 59

def preserve_order
  @preserve_order
end

- (Object) relevant_articles

Returns the value of attribute relevant_articles



58
59
60
# File 'lib/nanoc/helpers/blogging.rb', line 58

def relevant_articles
  @relevant_articles
end

- (Object) site

Returns the value of attribute site



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

def site
  @site
end

- (Object) title

Returns the value of attribute title



62
63
64
# File 'lib/nanoc/helpers/blogging.rb', line 62

def title
  @title
end

Instance Method Details

- (Object) build



79
80
81
82
83
84
# File 'lib/nanoc/helpers/blogging.rb', line 79

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

- (Object) validate



73
74
75
76
77
# File 'lib/nanoc/helpers/blogging.rb', line 73

def validate
  validate_config
  validate_feed_item
  validate_articles
end