Skip to content

Commit

Permalink
Use directly instead of through accessor and remove freezing
Browse files Browse the repository at this point in the history
  • Loading branch information
pjaspers authored and pjaspers committed Mar 3, 2022
1 parent aae040c commit 9a907aa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/orbf/rules_engine/data/invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ class ActivityItem < Orbf::RulesEngine::ValueObject::Model(:activity, :solution,
plugin Plugins::AfterInitialize

def after_init
@indexed_variables = variables.index_by { |v| [v.state, v.activity_code] }
freeze
@indexed_variables = @values[:variables].index_by { |v| [v.state, v.activity_code] }
end

def variable(code)
Expand Down

0 comments on commit 9a907aa

Please sign in to comment.