Class: Clef::Notation::Articulation
- Inherits:
-
Object
- Object
- Clef::Notation::Articulation
- Defined in:
- lib/clef/notation/articulation.rb
Constant Summary collapse
- TYPES =
%i[staccato tenuto accent marcato fermata].freeze
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type) ⇒ Articulation
constructor
A new instance of Articulation.
Constructor Details
#initialize(type) ⇒ Articulation
Returns a new instance of Articulation.
11 12 13 14 15 |
# File 'lib/clef/notation/articulation.rb', line 11 def initialize(type) raise ArgumentError, "unsupported articulation type" unless TYPES.include?(type) @type = type end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
8 9 10 |
# File 'lib/clef/notation/articulation.rb', line 8 def type @type end |