Exception: TinyClassifier::NoTrainingData

Inherits:
TinyClassifierError show all
Defined in:
lib/tiny-classifier/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data_dir) ⇒ NoTrainingData

Returns a new instance of NoTrainingData.



84
85
86
# File 'lib/tiny-classifier/errors.rb', line 84

def initialize(data_dir)
  @data_dir = data_dir
end

Instance Attribute Details

#data_dirObject (readonly)

Returns the value of attribute data_dir.



82
83
84
# File 'lib/tiny-classifier/errors.rb', line 82

def data_dir
  @data_dir
end

Instance Method Details

#messageObject



88
89
90
# File 'lib/tiny-classifier/errors.rb', line 88

def message
  "There is no training data at #{@data_dir}."
end