Class: Phew::Script

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

Overview

A script.

Instance Method Summary collapse

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_stringObject



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