Sha256: 73767aa7f20865ca4d864c0c10513be8d9e3ce865328a9c6fd4d2a0be665dd11

Contents?: true

Size: 291 Bytes

Versions: 5

Compression:

Stored size: 291 Bytes

Contents

class FactWithContext
  attr_reader :fact

  def initialize(options)
    @fact = options.fetch(:fact)
    @graph = options.fetch(:graph)
  end

  def context_summary
    context = @graph.by_subject(@fact.context_subject)
    ContextPresenter.new(context: context).context_summary
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dbd_data_engine-0.0.10 app/presenters/fact_with_context.rb
dbd_data_engine-0.0.9 app/presenters/fact_with_context.rb
dbd_data_engine-0.0.8 app/presenters/fact_with_context.rb
dbd_data_engine-0.0.7 app/presenters/fact_with_context.rb
dbd_data_engine-0.0.6 app/presenters/fact_with_context.rb