Sha256: f90996e391f4f6ed513d81a65061f251177f8275d65366fc551f1e45be941785

Contents?: true

Size: 344 Bytes

Versions: 10

Compression:

Stored size: 344 Bytes

Contents

module RubyRedtail
  class Setting
    def initialize(setting = {},api_hash)
      @api_hash = api_hash
      
      raise ArgumentError if setting.class != Hash
      setting.each do |key, value|
        key = key.underscore
        self.class.send :attr_accessor, key
        instance_variable_set "@#{key}", value
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ruby-redtail-0.3.8 lib/ruby-redtail/setting.rb
ruby-redtail-0.3.7 lib/ruby-redtail/setting.rb
ruby-redtail-0.3.6 lib/ruby-redtail/setting.rb
ruby-redtail-0.3.5 lib/ruby-redtail/setting.rb
ruby-redtail-0.3.4 lib/ruby-redtail/setting.rb
ruby-redtail-0.3.3 lib/ruby-redtail/setting.rb
ruby-redtail-0.3.2 lib/ruby-redtail/setting.rb
ruby-redtail-0.3.1 lib/ruby-redtail/setting.rb
ruby-redtail-0.3.0 lib/ruby-redtail/setting.rb
ruby-redtail-0.2.0 lib/ruby-redtail/setting.rb