Class: Smyte::Classification

Inherits:
Object
  • Object
show all
Includes:
LabelReporter
Defined in:
lib/smyte/classification.rb

Defined Under Namespace

Classes: Label

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from LabelReporter

#action, #label_actions, #label_report, #labels, #reset_labels

Constructor Details

#initialize(response, options = {}) ⇒ Classification

Returns a new instance of Classification.



11
12
13
14
# File 'lib/smyte/classification.rb', line 11

def initialize(response, options={})
  @response = response
  @options  = options || {}
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



9
10
11
# File 'lib/smyte/classification.rb', line 9

def options
  @options
end

#responseObject (readonly)

Returns the value of attribute response.



9
10
11
# File 'lib/smyte/classification.rb', line 9

def response
  @response
end

Class Method Details

.allowedObject



5
6
7
# File 'lib/smyte/classification.rb', line 5

def self.allowed
  new('verdict' => "ALLOW", 'labels' => {})
end