Top Level Namespace

Defined Under Namespace

Modules: Pyru, PyruPythonBridge, Pyru_Ruby_Bridge Classes: PyruCompiler, PyruLexer, PyruParser

Instance Method Summary collapse

Instance Method Details

#call_pyru_methodObject

Example method to demonstrate calling a Pyru method using the bridge module



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/pyru_examples.rb', line 7

def call_pyru_method
  begin
    # Call the Pyru method using the RubyBridge class
    result = PyruRubyBridge::RubyBridge.some_pyru_method("example_argument")

    # Print the result
    puts "Result from Pyru method: #{result}"
  rescue PyruRubyBridge::PyruException => e
    # Handle Pyru exceptions raised by the bridge module
    puts "Pyru exception caught: #{e.message}"
  end
end

#mainObject

Main method



21
22
23
24
# File 'lib/pyru_examples.rb', line 21

def main
  # Call the example method to demonstrate calling a Pyru method
  call_pyru_method
end