Class: Immutable
- Inherits:
-
Object
- Object
- Immutable
- Defined in:
- lib/lygre/gabcscore.rb
Overview
initialized by arguments or by assignment in a block; frozen thereafter
Direct Known Subclasses
GabcClef, GabcDivisio, GabcMusic, GabcNote, GabcScore, GabcSyllable
Instance Attribute Summary collapse
-
#text_value ⇒ Object
Returns the value of attribute text_value.
Instance Method Summary collapse
-
#initialize(args = {}) {|_self| ... } ⇒ Immutable
constructor
A new instance of Immutable.
Constructor Details
#initialize(args = {}) {|_self| ... } ⇒ Immutable
Returns a new instance of Immutable.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/lygre/gabcscore.rb', line 8 def initialize(args={}) args.each_pair do |k,v| writer = (k.to_s + '=').to_sym self.send(writer, v) end yield self if block_given? freeze end |
Instance Attribute Details
#text_value ⇒ Object
Returns the value of attribute text_value.
19 20 21 |
# File 'lib/lygre/gabcscore.rb', line 19 def text_value @text_value end |