Class: Array

Inherits:
Object show all
Defined in:
lib/h8/value.rb,
lib/h8/context.rb

Instance Method Summary collapse

Instance Method Details

#_select_js(callable) ⇒ Object



5
6
7
8
9
# File 'lib/h8/context.rb', line 5

def _select_js callable
  select { |item|
    callable.call item
  }
end

#to_ruby(depth = 0) ⇒ Object

Returns new array with all components converted to_ruby.

Returns:

  • new array with all components converted to_ruby



209
210
211
212
# File 'lib/h8/value.rb', line 209

def to_ruby depth=0
  depth += 1
  map { |x| x.to_ruby depth }
end