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
codeimpossible Goto Github PK
Name: Jared Barboza
Type: User
Company: @hudl
Bio: Future skeleton. 🐈 parent. Lover of all things 🍕. Dispenser of artisanal emoji, gifs and memes. They/Them.
Twitter: codeimpossible
Location: Boston, MA
Blog: http://barboza.io