Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 

README.md

kwstruct

Just like regular Struct, but uses keyword arguments.

Person = KwStruct.new(:name, :age)
sammy = Person.new(name: 'Sammy', age: 30)

Any non-existent arguments will raise an ArgumentError.

Installation

$ gem install kwstruct

Credits

Thanks @apeiros for ideas.
Thanks @bughit for hitting a bug.

About

Struct with keyword arguments support

Topics

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.