class MetadataWrapper
Attributes
metadata[R]
Public Class Methods
new(metadata)
click to toggle source
# File lib/prof/matchers/metadata.rb, line 83 def initialize(metadata) @metadata = metadata end
Public Instance Methods
job(job_name:)
click to toggle source
# File lib/prof/matchers/metadata.rb, line 87 def job(job_name:) job = jobs.find { |j| j['name'] == job_name.to_s }.tap do |j| raise MetadataError.new("Could not find job type: #{job_name} in metadata") unless j end MetadataJob.new(job) end
Private Instance Methods
jobs()
click to toggle source
# File lib/prof/matchers/metadata.rb, line 99 def jobs metadata['job_types'] end