class SearchKit::Models::Events
Attributes
contents[R]
member_class[R]
Public Class Methods
[](*arguments)
click to toggle source
# File lib/search_kit/models/events.rb, line 6 def self.[](*arguments) new(arguments) end
new(contents = [])
click to toggle source
# File lib/search_kit/models/events.rb, line 12 def initialize(contents = []) @contents = contents @member_class = SearchKit::Models::Event end
Public Instance Methods
<<(new_event)
click to toggle source
# File lib/search_kit/models/events.rb, line 17 def <<(new_event) case new_event when Hash then contents << member_class.new(new_event) when member_class then contents << new_event else contents end end
each(&block)
click to toggle source
# File lib/search_kit/models/events.rb, line 25 def each(&block) contents.each(&block) end