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



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

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

Instance Attribute Details

- (Object) author_name

Returns the value of attribute author_name



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

def author_name
  @author_name
end

- (Object) author_uri

Returns the value of attribute author_uri



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

def author_uri
  @author_uri
end

- (Object) content_proc

Returns the value of attribute content_proc



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

def content_proc
  @content_proc
end

- (Object) excerpt_proc

Returns the value of attribute excerpt_proc



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

def excerpt_proc
  @excerpt_proc
end

- (Object) icon

Returns the value of attribute icon



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

def icon
  @icon
end

- (Object) limit

Returns the value of attribute limit



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

def limit
  @limit
end

- (Object) logo

Returns the value of attribute logo



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

def 
  @logo
end

- (Object) relevant_articles

Returns the value of attribute relevant_articles



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

def relevant_articles
  @relevant_articles
end

- (Object) site

Returns the value of attribute site



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

def site
  @site
end

- (Object) title

Returns the value of attribute title



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

def title
  @title
end

Instance Method Details

- (Object) build



83
84
85
86
87
88
# File 'lib/nanoc/helpers/blogging.rb', line 83

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

- (Object) validate



77
78
79
80
81
# File 'lib/nanoc/helpers/blogging.rb', line 77

def validate
  validate_config
  validate_feed_item
  validate_articles
end