Sha256: 7017c42d551cbc509f348ce8b79e7fd8b1a66891861f9cba5870a95ce28ab766

Contents?: true

Size: 545 Bytes

Versions: 6

Compression:

Stored size: 545 Bytes

Contents

module GreatSchools # :nodoc:
  # = GreatSchools Test
  class Test < Model
    attr_accessor :name, :id, :description, :abbreviation, :scale, :level_code, :results

    # Set an array of +GreatSchools::Result+.
    #
    # ==== Attributes
    #
    # * +params+ - a +Hash+ or +Array+ of +GreatSchools::Result+ attributes.
    def results=(params)
      @results = []

      Array.wrap(params).each do |hash|
        @results << GreatSchools::Result.new(hash)
      end

      @results
    end
    alias_method :test_result=, :results=
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
great_schools-0.2.3 lib/great_schools/test.rb
great_schools-0.2.1 lib/great_schools/test.rb
great_schools-0.2.0 lib/great_schools/test.rb
great_schools-0.1.2 lib/great_schools/test.rb
great_schools-0.1.1 lib/great_schools/test.rb
great_schools-0.1.0 lib/great_schools/test.rb