Class: HeadMusic::Named::LocalizedName

Inherits:
Object
  • Object
show all
Defined in:
lib/head_music/named.rb

Overview

A LocalizedName is the name of a rudiment in a locale.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, locale_code: Locale::DEFAULT_CODE, abbreviation: nil) ⇒ LocalizedName

Returns a new instance of LocalizedName.



45
46
47
48
49
# File 'lib/head_music/named.rb', line 45

def initialize(name:, locale_code: Locale::DEFAULT_CODE, abbreviation: nil)
  @name = name
  @locale = Locale.get(locale_code)
  @abbreviation = abbreviation
end

Instance Attribute Details

#abbreviationObject (readonly)

Returns the value of attribute abbreviation.



40
41
42
# File 'lib/head_music/named.rb', line 40

def abbreviation
  @abbreviation
end

#localeObject (readonly)

Returns the value of attribute locale.



40
41
42
# File 'lib/head_music/named.rb', line 40

def locale
  @locale
end

#nameObject (readonly)

Returns the value of attribute name.



40
41
42
# File 'lib/head_music/named.rb', line 40

def name
  @name
end