Class: Smith::Budget::PublicStateValidator
- Inherits:
-
Object
- Object
- Smith::Budget::PublicStateValidator
- Extended by:
- Dry::Initializer
- Defined in:
- lib/smith/budget/public_state_validator.rb
Instance Method Summary collapse
Instance Method Details
#call(state) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/smith/budget/public_state_validator.rb', line 14 def call(state) representation.externalize(state.consumed) representation.externalize(state.reserved) limits.each_key do |dimension| remaining = state_transition.remaining(state, dimension) representation.externalize_amount(dimension, remaining) end state end |