Class: I18n::Inflector::HSet

Inherits:
Set
  • Object
show all
Defined in:
lib/i18n-inflector/hset.rb

Overview

This class keeps sets of data with hash-like access

Instance Method Summary collapse

Instance Method Details

#[](k) ⇒ Boolean

This method performs a fast check if an element exists in a set using hash-like syntax.

Parameters:

  • k (Object)

    the element to check

Returns:

  • (Boolean)

    true if element exists in set



19
20
21
# File 'lib/i18n-inflector/hset.rb', line 19

def [](k)
  include?(k)
end