class BSIServices::BSIModule

Parent class of a standard BSIService

Public Class Methods

new(creds, options={}) click to toggle source
# File lib/rbc/bsi.rb, line 262
def initialize(creds, options={})
  methods = []
  methods       = options[:methods] if options[:methods]
  @@debug       = options[:debug]
  @@stealth     = options[:stealth]
  @@session_id  = creds[:session_id] if creds[:session_id]
  @@target_url  = options[:url]
  @@marshal     = Marshaler.new(@@target_url, options)
  add_methods(methods)
end

Public Instance Methods

add_methods(methods) click to toggle source
# File lib/rbc/bsi.rb, line 273
def add_methods(methods)
  methods.each do |meth|
    define_singleton_method meth, ->(*arguments) { @@marshal.build_call( "#{self.class.to_s.split('::').last.downcase}.#{__method__}", *arguments.unshift( @@session_id ) ) }
  end
end