Class: InciScore::Recognizer::Rules::Component

Inherits:
Struct
  • Object
show all
Defined in:
lib/inci_score/recognizer_rules.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#hazardObject

Returns the value of attribute hazard

Returns:

  • (Object)

    the current value of hazard



10
11
12
# File 'lib/inci_score/recognizer_rules.rb', line 10

def hazard
  @hazard
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



10
11
12
# File 'lib/inci_score/recognizer_rules.rb', line 10

def name
  @name
end

Instance Method Details

#to_sObject



11
12
13
# File 'lib/inci_score/recognizer_rules.rb', line 11

def to_s
  "#{name} (#{hazard})"
end