-
-
Save bigimot/69727d39d33781d7f5f7 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
Class Example | |
def initialize(*args) | |
args.each do |k,v| | |
puts "setting value #{k}" | |
instance_variable_set("@#{k}", v) unless v.nil? | |
end | |
# @obj = obj | |
# @some_attributes = self.class.get_some_attribetus | |
end | |
end | |
# Example.new({:obj => some_object, :attributes => "text"}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment