Class: Hierogloss::MdC::Sign
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ Sign
constructor
A new instance of Sign.
- #to_debug ⇒ Object
- #to_linear_hieroglyphs ⇒ Object
- #to_mdc(precedence) ⇒ Object
- #to_unicode ⇒ Object
Constructor Details
#initialize(name) ⇒ Sign
Returns a new instance of Sign.
12 13 14 |
# File 'lib/hierogloss/mdc.rb', line 12 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/hierogloss/mdc.rb', line 10 def name @name end |
Instance Method Details
#to_debug ⇒ Object
20 21 22 |
# File 'lib/hierogloss/mdc.rb', line 20 def to_debug name end |
#to_linear_hieroglyphs ⇒ Object
24 25 26 |
# File 'lib/hierogloss/mdc.rb', line 24 def to_linear_hieroglyphs to_unicode end |
#to_mdc(precedence) ⇒ Object
28 29 30 31 32 33 |
# File 'lib/hierogloss/mdc.rb', line 28 def to_mdc(precedence) mdc = Hierogloss::Dictionary.sign_to_mdc(name) || name # Wrap composite signs in parens. return "(#{mdc})" if mdc =~ /[-:*]/ mdc end |
#to_unicode ⇒ Object
16 17 18 |
# File 'lib/hierogloss/mdc.rb', line 16 def to_unicode Hierogloss::Dictionary.mdc_to_sign(name) || name end |