Sha256: 1e9bdbd7377bc5e1fa6417314e4c14b247e88d1775e0e85f908027e47e77c20b

Contents?: true

Size: 658 Bytes

Versions: 6

Compression:

Stored size: 658 Bytes

Contents

module Quarry
  module DataSet
    class Example
      attr_reader :example
      
      def initialize(example, data_set)
        @data_set = data_set
        @example  = example
      end
      
      def [](index)
        @example.get_value(index)
      end
      
      def []=(index, value)
        @example.set_value(index, value)
      end
      
      def category
        @data_set.categories[@example.get_category_index]
      end
      
      def category_index
        @example.get_category_index
      end
      
      def category=(new_category)
        @example.set_category_index(@data_set.data_set, new_category)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
thera-0.0.8 lib/quarry_rb/data_set/example.rb
thera-0.0.7 lib/quarry_rb/data_set/example.rb
thera-0.0.6 lib/quarry_rb/data_set/example.rb
thera-0.0.5 lib/quarry_rb/data_set/example.rb
thera-0.0.4 lib/quarry_rb/data_set/example.rb
thera-0.0.3 lib/quarry_rb/data_set/example.rb