Module: Multilang::Slot::Access

Defined in:
lib/multilang/slot.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#slotMultilang::Slot (readonly)

Returns slot that is bound to class or module.

Returns:



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.

Parameters:

  • language_spec (String, Symbol)

Returns:

  • (Object)

    registered object to the slot

See Also:



65
66
67
# File 'lib/multilang/slot.rb', line 65

def [](language_spec)
  slot[language_spec]
end