Class: ChronoForge::Dashboard::ContextPresenter

Inherits:
Object
  • Object
show all
Defined in:
app/presenters/chrono_forge/dashboard/context_presenter.rb

Instance Method Summary collapse

Constructor Details

#initialize(workflow) ⇒ ContextPresenter

Returns a new instance of ContextPresenter.



4
# File 'app/presenters/chrono_forge/dashboard/context_presenter.rb', line 4

def initialize(workflow) = @workflow = workflow

Instance Method Details

#byte_sizeObject



10
# File 'app/presenters/chrono_forge/dashboard/context_presenter.rb', line 10

def byte_size = context.to_json.bytesize

#nodesObject



6
7
8
# File 'app/presenters/chrono_forge/dashboard/context_presenter.rb', line 6

def nodes
  context.map { |k, v| {key: k, value: v, type: v.class.name, bytes: v.to_json.bytesize} }
end