Method: Inforouter::PropertyRow#initialize
- Defined in:
- lib/inforouter/property_row.rb
#initialize(params = {}) ⇒ PropertyRow
Returns a new instance of PropertyRow.
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/inforouter/property_row.rb', line 9 def initialize(params = {}) # Declare instance variables from params hash. params.each do |k, v| # Remove leading at. k = k.to_s.sub(/^@/, '') instance_variable_set("@#{k}", v) eigenclass = class << self; self; end eigenclass.class_eval do attr_accessor k end end end |