phereford/d3api

View on GitHub
lib/d3api/base_model.rb

Summary

Maintainability
A
0 mins
Test Coverage
module D3api
  class BaseModel
    include D3api::Request

    def initialize(values)
      JSON.parse(values)
    end

    private
    def set_method(values, static_array)
      static_array.each do |key, value|
        self.send("#{key}=", values[value])
      end
    end
  end
end