Class: Selene::FeedBuilder

Inherits:
ComponentBuilder show all
Defined in:
lib/selene/feed_builder.rb

Instance Attribute Summary

Attributes inherited from ComponentBuilder

#component, #errors, #name, #parent

Instance Method Summary collapse

Methods inherited from ComponentBuilder

#add, #contains?, #parse, #to_ical, #value

Methods included from ComponentValidator

#can_add?, included, inherited, #multiple?, #properties, #required?, #valid?

Constructor Details

#initializeFeedBuilder

Returns a new instance of FeedBuilder.



3
4
5
# File 'lib/selene/feed_builder.rb', line 3

def initialize
  super('feed')
end

Instance Method Details

#can_contain?(builder) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/selene/feed_builder.rb', line 7

def can_contain?(builder)
  !%w(vevent vtimezone valarm standard daylight).include?(builder.name)
end

#error(message) ⇒ Object



11
12
13
# File 'lib/selene/feed_builder.rb', line 11

def error(message) 
  @component['errors'] << message
end