Class: Ditto::Label

Inherits:
Object
  • Object
show all
Defined in:
lib/ditto/label.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Label

Returns a new instance of Label.



5
6
7
# File 'lib/ditto/label.rb', line 5

def initialize(data)
  @data = data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



3
4
5
# File 'lib/ditto/label.rb', line 3

def data
  @data
end

Instance Method Details

#confidenceObject



17
18
19
# File 'lib/ditto/label.rb', line 17

def confidence
  data[:confidence]
end

#idObject



9
10
11
# File 'lib/ditto/label.rb', line 9

def id
  data[:id]
end

#labelObject



13
14
15
# File 'lib/ditto/label.rb', line 13

def label
  data[:label]
end