Class: Whatlang::Info

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lang, script, is_reliable, confidence) ⇒ Info

Returns a new instance of Info.



26
27
28
29
30
31
# File 'lib/whatlang.rb', line 26

def initialize(lang, script, is_reliable, confidence)
  @lang = lang
  @script = script
  @is_reliable = is_reliable
  @confidence = confidence
end

Instance Attribute Details

#confidenceObject (readonly)

Returns the value of attribute confidence.



24
25
26
# File 'lib/whatlang.rb', line 24

def confidence
  @confidence
end

#langObject (readonly)

Returns the value of attribute lang.



24
25
26
# File 'lib/whatlang.rb', line 24

def lang
  @lang
end

#scriptObject (readonly)

Returns the value of attribute script.



24
25
26
# File 'lib/whatlang.rb', line 24

def script
  @script
end

Instance Method Details

#reliable?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/whatlang.rb', line 33

def reliable?
  @is_reliable
end