Class: ChronoForge::Dashboard::ContextPresenter
- Inherits:
-
Object
- Object
- ChronoForge::Dashboard::ContextPresenter
- Defined in:
- app/presenters/chrono_forge/dashboard/context_presenter.rb
Instance Method Summary collapse
- #byte_size ⇒ Object
-
#initialize(workflow) ⇒ ContextPresenter
constructor
A new instance of ContextPresenter.
- #nodes ⇒ Object
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_size ⇒ Object
10 |
# File 'app/presenters/chrono_forge/dashboard/context_presenter.rb', line 10 def byte_size = context.to_json.bytesize |
#nodes ⇒ Object
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 |