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.



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

#abbreviationObject (readonly)

Returns the value of attribute abbreviation.



38
39
40
# File 'lib/head_music/named.rb', line 38

def abbreviation
  @abbreviation
end

#localeObject (readonly)

Returns the value of attribute locale.



38
39
40
# File 'lib/head_music/named.rb', line 38

def locale
  @locale
end

#nameObject (readonly)

Returns the value of attribute name.



38
39
40
# File 'lib/head_music/named.rb', line 38

def name
  @name
end