Last active
August 22, 2017 09:08
-
-
Save anasbgoncalves/15673358ea8d59f8024beb0e46f9f17e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Spoonacular | |
class Base | |
attr_accessor :errors | |
def initialize(args = {}) | |
args.each do |name, value| | |
attr_name = name.to_s.underscore | |
send("#{attr_name}=", value) if respond_to?("#{attr_name}=") | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment