Skip to content

Instantly share code, notes, and snippets.

@zeroeth
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeroeth/9341004 to your computer and use it in GitHub Desktop.
Save zeroeth/9341004 to your computer and use it in GitHub Desktop.
because clever
class HistoryResultRow
def initialize
700.times do |number|
self.class.send :define_method, "Col#{number}" do
instance_variable_get "@col#{number}"
end
self.class.send :define_method, "Col#{number}=" do |value|
instance_variable_set "@col#{number}", value
end
end
end
end
row = HistoryResultRow.new
row.Col24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment