class Readme::Har::Collection

Public Class Methods

new(filter, hash) click to toggle source
# File lib/readme/har/collection.rb, line 4
def initialize(filter, hash)
  @filter = filter
  @hash = hash
end

Public Instance Methods

to_a() click to toggle source
# File lib/readme/har/collection.rb, line 13
def to_a
  filtered_hash.map { |name, value| {name: name, value: value} }
end
to_h() click to toggle source
# File lib/readme/har/collection.rb, line 9
def to_h
  filtered_hash
end

Private Instance Methods

filtered_hash() click to toggle source
# File lib/readme/har/collection.rb, line 19
def filtered_hash
  @filter.filter(@hash)
end