-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
It seems that class kit does not allow us to use the shortcut collection.max(&:some_method) so we need to use the block version.
array_of_entities.max(&:workflow_version)
ArgumentError: wrong number of arguments (given 1, expected 0)
from /usr/lib/ruby/gems/2.4.0/gems/class_kit-0.4.0/lib/class_kit/class_methods.rb:15:in `block (2 levels) in attr_accessor_type'
array_of_entities.max { |e| e.workflow_version }
=> #<SomeModule::SomeModule::SomeModule::Workflow:0x000055d5495ba918
@created_at=1525168505.8044086,
@definition={"name"=>"test_event", "steps"=>[{"type"=>"action", "workflow"=>"test_event", "on_fail_step"=>"failure_event", "key"=>"step_1", "klass"=>"Foo"}, {"type"=>"action", "workflow"=>"test_event", "key"=>"failure_event", "klass"=>"Foo"}]},
@event_type="some_event_type",
@workflow_type="some_event_type",
@workflow_version=2>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels