Class: Google::Language
- Inherits:
-
Object
- Object
- Google::Language
- Defined in:
- lib/google_translate.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, code) ⇒ Language
constructor
A new instance of Language.
- #to_s ⇒ Object
Constructor Details
#initialize(name, code) ⇒ Language
Returns a new instance of Language.
11 12 13 14 |
# File 'lib/google_translate.rb', line 11 def initialize(name, code) @name = name @code = code end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
9 10 11 |
# File 'lib/google_translate.rb', line 9 def code @code end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/google_translate.rb', line 9 def name @name end |
Instance Method Details
#to_s ⇒ Object
16 17 18 |
# File 'lib/google_translate.rb', line 16 def to_s "(" + @code + ": " + @name + ")" end |