class Meatbag
def initialize()
h = yield(self) if block_given?
h.each do |key, value|
instance_eval { class << self; self end }.send(:attr_accessor, key)
self.instance_variable_set("@#{key}".to_sym, value)
end
end
end
def main
@me = Meatbag.new do |m|
{
:name => "Jared Barboza",
:username => "codeimpossible",
:pronouns => "they/them",
:location => "Boston, MA",
:blog => "http://barboza.io",
:hobbies => [:coding, :gaming, :film],
# working on a game called Electric Noir
:interests => [:programming, :gamedevelopment, :opensource],
:is_active => true
}
end
end
-
Notifications
You must be signed in to change notification settings - Fork 0
codeimpossible/codeimpossible
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Β | Β | |||
Β | Β | |||
Β | Β | |||
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published