lib/misp/feed.rb in misp-0.1.1 vs lib/misp/feed.rb in misp-0.1.2
- old
+ new
@@ -46,11 +46,11 @@
attr_reader :headers
# @return [Boolean]
attr_reader :caching_enabled
def initialize(**attributes)
- attributes = normalize_attributes(attributes)
+ attributes = normalize_attributes(**attributes)
@id = attributes.dig(:id)
@name = attributes.dig(:name) || "feed name"
@provider = attributes.dig(:provider) || "my provider"
@url = attributes.dig(:url) || "http://example.com"
@@ -112,10 +112,10 @@
# @return [Array<MISP::Feed>]
#
def list
_get("/feeds/index") do |feeds|
feeds.map do |feed|
- Feed.new feed
+ Feed.new(**feed)
end
end
end
#