Module: Functions_utils::ClassMethods

Defined in:
lib/ruby-band/weka/classifiers/functions/functions_utils.rb

Overview

Class methods module

Class Method Summary collapse

Class Method Details

.classifier_attr_accessor(*args) ⇒ Object



66
67
68
69
70
71
72
73
# File 'lib/ruby-band/weka/classifiers/functions/functions_utils.rb', line 66

def self.classifier_attr_accessor(*args)
  args.each do |arg|
    #Here's the getter
    self.class_eval("def #{arg};@#{arg};end")
    #Here's the setter
    self.class_eval("def set_#{arg}(val);@#{arg}=val;end")
  end
end