Parent

Namespace

Class/Module Index [+]

Quicksearch

Class

Public Class Methods

===(object) click to toggle source
# File lib/gherkin/native/java.rb, line 57
def ===(object)
  super || object.java_kind_of?(java_class)
end
java_class() click to toggle source
# File lib/gherkin/native/java.rb, line 61
def java_class
  names = self.name.split('::')
  package = Java
  names[0..-2].each do |module_name|
    package = package.__send__(module_name.downcase)
  end

  package.__send__(names[-1])
end
javaify(arg) click to toggle source
# File lib/gherkin/native/java.rb, line 40
def javaify(arg)
  if Array === arg
    arg.map{|a| javaify(a)}
  else
    case(arg)
    when Regexp
      java.util.regex.Pattern.compile(arg.source)
    when Symbol
      arg.to_s
    when IO, StringIO
      IOWriter.new(arg)
    else
      arg
    end
  end
end
new(*args) click to toggle source
# File lib/gherkin/native/therubyracer.rb, line 6
def new(*args)
  js = {
    # Add more mappings here if needed. The mappings are only used by test code.
    'Gherkin::Formatter::JSONFormatter' => 'js/lib/gherkin/formatter/json_formatter.js',
    'Gherkin::Lexer::En' => 'js/lib/gherkin/lexer/en.js'
  }[self.name]
  if(js)
    Proxy.new(js, *args)
  else
    super(*args)
  end
end

Public Instance Methods

native_impl(lib) click to toggle source
# File lib/gherkin/native/null.rb, line 2
def native_impl(lib)
  # no-op
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.