Class: Langusta::Language
- Inherits:
-
Object
- Object
- Langusta::Language
- Defined in:
- lib/langusta/language.rb
Instance Attribute Summary collapse
-
#lang ⇒ Object
readonly
Returns the value of attribute lang.
-
#prob ⇒ Object
readonly
Returns the value of attribute prob.
Instance Method Summary collapse
-
#initialize(lang, prob) ⇒ Language
constructor
A new instance of Language.
- #to_s ⇒ Object
Constructor Details
#initialize(lang, prob) ⇒ Language
Returns a new instance of Language.
5 6 7 8 |
# File 'lib/langusta/language.rb', line 5 def initialize(lang, prob) @lang = lang @prob = prob end |
Instance Attribute Details
#lang ⇒ Object (readonly)
Returns the value of attribute lang.
3 4 5 |
# File 'lib/langusta/language.rb', line 3 def lang @lang end |
#prob ⇒ Object (readonly)
Returns the value of attribute prob.
3 4 5 |
# File 'lib/langusta/language.rb', line 3 def prob @prob end |
Instance Method Details
#to_s ⇒ Object
10 11 12 |
# File 'lib/langusta/language.rb', line 10 def to_s lang ? "#{lang}:#{prob}" : "" end |