Class: NVD::JSONFeeds::Feed

Inherits:
Object
  • Object
show all
Defined in:
lib/nvd/json_feeds/feed.rb

Overview

Represents a feed and it's various downloads.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Feed

Initializes the feed.

Parameters:

  • name (:modified, :recent, Integer)

    The feed name or year number.



40
41
42
43
44
45
46
# File 'lib/nvd/json_feeds/feed.rb', line 40

def initialize(name)
  @name = name

  @meta = MetaFeedURI.new(@name,'.meta')
  @gz   = GzFeedURI.new(@name,'.json.gz')
  @zip  = ZipFeedURI.new(@name,'.json.zip')
end

Instance Attribute Details

#gzGzFeedURI (readonly)

The ".gz" feed URI.

Returns:



27
28
29
# File 'lib/nvd/json_feeds/feed.rb', line 27

def gz
  @gz
end

#metaMetaFeedURI (readonly)

The "meta" feed URI.

Returns:



22
23
24
# File 'lib/nvd/json_feeds/feed.rb', line 22

def meta
  @meta
end

#name:modified, ... (readonly)

The feed name or year number.

Returns:

  • (:modified, :recent, Integer)


17
18
19
# File 'lib/nvd/json_feeds/feed.rb', line 17

def name
  @name
end

#zipZipFeedURI (readonly)

The ".zip" feed URI.

Returns:



32
33
34
# File 'lib/nvd/json_feeds/feed.rb', line 32

def zip
  @zip
end