Module: Ruuuby::Attribute::Includable::SubscriptIndexing

Included in:
Array, String, Symbol
Defined in:
lib/ruuuby/module/attribute/includable/subscript_indexing.rb

Overview

provide functionality to access element by index denoted by subscripts

Instance Method Summary collapse

Instance Method Details

#*

Returns element at index(0).

Returns:

  • element at index(0)



16
# File 'lib/ruuuby/module/attribute/includable/subscript_indexing.rb', line 16

def 

#₀?(compare_to) ⇒ Boolean

TODO: error check on index accessed (compared to length)

Returns:

  • true, if element at index(0) equals arg(compare_to)



20
# File 'lib/ruuuby/module/attribute/includable/subscript_indexing.rb', line 20

def 

#*

Returns element at index(1).

Returns:

  • element at index(1)



23
# File 'lib/ruuuby/module/attribute/includable/subscript_indexing.rb', line 23

def 

#₁?(compare_to) ⇒ Boolean

TODO: error check on index accessed (compared to length)

Returns:

  • true, if element at index(1) equals arg(compare_to)



27
# File 'lib/ruuuby/module/attribute/includable/subscript_indexing.rb', line 27

def 

#*

Returns element at index(2).

Returns:

  • element at index(2)



30
# File 'lib/ruuuby/module/attribute/includable/subscript_indexing.rb', line 30

def 

#*

Returns element at index(3).

Returns:

  • element at index(3)



33
# File 'lib/ruuuby/module/attribute/includable/subscript_indexing.rb', line 33

def