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.



28
29
30
31
32
33
# File 'lib/whatlang.rb', line 28

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.



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

def confidence
  @confidence
end

#langObject (readonly)

Returns the value of attribute lang.



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

def lang
  @lang
end

#scriptObject (readonly)

Returns the value of attribute script.



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

def script
  @script
end

Instance Method Details

#reliable?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/whatlang.rb', line 35

def reliable?
  @is_reliable
end