Class: HeadMusic::Named::LocalizedName

Inherits:
Object
  • Object
show all
Defined in:
lib/head_music/named/localized_name.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.



9
10
11
12
13
# File 'lib/head_music/named/localized_name.rb', line 9

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.



4
5
6
# File 'lib/head_music/named/localized_name.rb', line 4

def abbreviation
  @abbreviation
end

#localeObject (readonly)

Returns the value of attribute locale.



4
5
6
# File 'lib/head_music/named/localized_name.rb', line 4

def locale
  @locale
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/head_music/named/localized_name.rb', line 4

def name
  @name
end