Class: Phew::Script
- Inherits:
-
Object
- Object
- Phew::Script
- Defined in:
- lib/phew/script.rb
Overview
A script.
Instance Method Summary collapse
-
#initialize(name) ⇒ Script
constructor
A new instance of Script.
- #sample_string ⇒ Object
Constructor Details
#initialize(name) ⇒ Script
Returns a new instance of Script.
8 9 10 11 12 |
# File 'lib/phew/script.rb', line 8 def initialize(name) symbol = name.to_sym @symbol = symbol @lang = Pango.script_get_sample_language symbol end |
Instance Method Details
#sample_string ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/phew/script.rb', line 14 def sample_string if @lang.nil? "No sample available" else @lang.get_sample_string end end |