Module: Multilang::Slot::Access
- Defined in:
- lib/multilang/slot.rb
Instance Attribute Summary collapse
-
#slot ⇒ Multilang::Slot
readonly
Slot that is bound to class or module.
Instance Method Summary collapse
-
#[](language_spec) ⇒ Object
Get registered object in the slot.
Instance Attribute Details
#slot ⇒ Multilang::Slot (readonly)
Returns slot that is bound to class or module.
54 55 56 |
# File 'lib/multilang/slot.rb', line 54 def slot instance_variable_get(Multilang::SLOT_KEY) end |
Instance Method Details
#[](language_spec) ⇒ Object
Get registered object in the slot.
65 66 67 |
# File 'lib/multilang/slot.rb', line 65 def [](language_spec) slot[language_spec] end |