Skip to content
This repository has been archived by the owner on Oct 19, 2018. It is now read-only.

Add state new usage for following example. #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/hyper-store/state_wrapper/argument_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ def parse_arguments(*args)
end

name, initial_value = args[0].shift
# Otherwise just the name is passed in by itself first
elsif args.count == 3
# name, initial value is passed in by first and second
name, initial_value = args.shift(2)
else
# Otherwise just the name is passed in by itself first
name = args.shift
end

Expand Down