Module: When::CalendarTypes::CalendarNote::LabelAccess
- Defined in:
- lib/when_exe/calendartypes.rb
Overview
暦注要素への名前アクセス機能提供
Instance Attribute Summary collapse
-
#_pool ⇒ Object
readonly
Returns the value of attribute _pool.
Instance Method Summary collapse
-
#[](key) ⇒ Object
暦注要素への名前(label)によるアクセス.
Instance Attribute Details
#_pool ⇒ Object (readonly)
Returns the value of attribute _pool.
1114 1115 1116 |
# File 'lib/when_exe/calendartypes.rb', line 1114 def _pool @_pool end |
Instance Method Details
#[](key) ⇒ Object
暦注要素への名前(label)によるアクセス
1124 1125 1126 1127 1128 |
# File 'lib/when_exe/calendartypes.rb', line 1124 def [](key) return super if key.kind_of?(Numeric) @_pool ||= Hash[*(inject([]) {|pair, v| pair << v.label.to_s << v})] @_pool[key] end |