Class: VCLog::Heuristics::Type

Inherits:
Object
  • Object
show all
Defined in:
lib/vclog/heuristics/type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, level, label) ⇒ Type

Returns a new instance of Type.



9
10
11
12
13
# File 'lib/vclog/heuristics/type.rb', line 9

def initialize(type, level, label)
  @type  = type.to_sym
  @level = level.to_i
  @label = label.to_s
end

Instance Attribute Details

#labelObject (readonly)

Returns the value of attribute label.



19
20
21
# File 'lib/vclog/heuristics/type.rb', line 19

def label
  @label
end

#levelObject (readonly)

Returns the value of attribute level.



17
18
19
# File 'lib/vclog/heuristics/type.rb', line 17

def level
  @level
end

#typeObject (readonly)

Returns the value of attribute type.



15
16
17
# File 'lib/vclog/heuristics/type.rb', line 15

def type
  @type
end

Instance Method Details

#to_aObject



22
23
24
# File 'lib/vclog/heuristics/type.rb', line 22

def to_a
  [type, level, label]
end