Skip to content

Instantly share code, notes, and snippets.

@ramontayag
Created November 8, 2016 01:32
Show Gist options
  • Save ramontayag/e46d5396abcf071168ce0b009dd6eedc to your computer and use it in GitHub Desktop.
Save ramontayag/e46d5396abcf071168ce0b009dd6eedc to your computer and use it in GitHub Desktop.
Dry::Struct - omit value from init hash
class Car < Dry::Struct
attribute :brand_name, Types::String.optional
attribute :model_number, Types::String.optional
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment