Class: HeadMusic::Named::LocalizedName
- Inherits:
-
Object
- Object
- HeadMusic::Named::LocalizedName
- Defined in:
- lib/head_music/named.rb
Overview
A LocalizedName is the name of a rudiment in a locale.
Instance Attribute Summary collapse
-
#abbreviation ⇒ Object
readonly
Returns the value of attribute abbreviation.
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name:, locale_code: Locale::DEFAULT_CODE, abbreviation: nil) ⇒ LocalizedName
constructor
A new instance of LocalizedName.
Constructor Details
#initialize(name:, locale_code: Locale::DEFAULT_CODE, abbreviation: nil) ⇒ LocalizedName
Returns a new instance of LocalizedName.
43 44 45 46 47 |
# File 'lib/head_music/named.rb', line 43 def initialize(name:, locale_code: Locale::DEFAULT_CODE, abbreviation: nil) @name = name @locale = Locale.get(locale_code) @abbreviation = abbreviation end |
Instance Attribute Details
#abbreviation ⇒ Object (readonly)
Returns the value of attribute abbreviation.
38 39 40 |
# File 'lib/head_music/named.rb', line 38 def abbreviation @abbreviation end |
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
38 39 40 |
# File 'lib/head_music/named.rb', line 38 def locale @locale end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
38 39 40 |
# File 'lib/head_music/named.rb', line 38 def name @name end |