Class: When::CalendarTypes::CalendarNote::JapaneseNote::Note
- Inherits:
-
NoteElement
- Object
- BasicTypes::Object
- NoteElement
- When::CalendarTypes::CalendarNote::JapaneseNote::Note
- Defined in:
- lib/when_exe/region/japanese_notes.rb,
lib/when_exe/region/japanese_notes.rb
Overview
日本暦注用の NoteObjects の要素のための内部クラス
Constant Summary
Constants included from Parts::Resource
Parts::Resource::LabelProperty
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
-
#suffix ⇒ Object
readonly
Returns the value of attribute suffix.
Attributes included from Parts::Resource
#_pool, #child, #keys, #locale, #namespace
Instance Method Summary collapse
Methods inherited from NoteElement
Methods included from Parts::Resource
#[], #^, _decode, _encode, _extract_prefix, _instance, _parse, _path_with_prefix, _replace_tags, _setup_, #each, #enum_for, #hierarchy, #include?, #included?, #iri, #leaf?, #m17n, #map, #next, #parent, #prev, #registered?
Methods included from Parts::Resource::Pool
#[], #[]=, #_pool, #_setup_, #pool_keys
Methods included from Parts::Resource::Synchronize
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class When::Parts::Resource
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
422 423 424 |
# File 'lib/when_exe/region/japanese_notes.rb', line 422 def label @label end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
422 423 424 |
# File 'lib/when_exe/region/japanese_notes.rb', line 422 def position @position end |
#suffix ⇒ Object (readonly)
Returns the value of attribute suffix.
422 423 424 |
# File 'lib/when_exe/region/japanese_notes.rb', line 422 def suffix @suffix end |
Instance Method Details
#to_note_hash(note, dates = nil) ⇒ Object
424 425 426 427 428 429 430 431 432 433 434 435 |
# File 'lib/when_exe/region/japanese_notes.rb', line 424 def to_note_hash(note, dates=nil) { :note => self, :value => case @suffix when '是' ; [@label + '是-', note[/.$/]] when '在' ; [@label + '在-', note] when '-' ; [@label + '-', note] else ; note end, :position => @position[@position.size == 1 ? 0 : dates.index_g] } end |