Class: IcsValidator::FeedValidator
- Inherits:
-
Object
- Object
- IcsValidator::FeedValidator
- Defined in:
- lib/ics_validator/feed_validator.rb
Overview
Validate an iCalendar feed by URL.
Instance Method Summary collapse
-
#initialize(feed_url) ⇒ FeedValidator
constructor
A new instance of FeedValidator.
- #valid? ⇒ Boolean
Constructor Details
#initialize(feed_url) ⇒ FeedValidator
Returns a new instance of FeedValidator.
10 11 12 |
# File 'lib/ics_validator/feed_validator.rb', line 10 def initialize(feed_url) @feed_url = feed_url end |
Instance Method Details
#valid? ⇒ Boolean
14 15 16 17 18 19 |
# File 'lib/ics_validator/feed_validator.rb', line 14 def valid? if r = validation_results results = r.children.map{|c| c.attr(:result)} results.compact.uniq == ['pass'] end end |