Module: JIJI::Permitted

Defined in:
lib/jiji/agent/permitter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#permitterObject

Returns the value of attribute permitter.



20
21
22
# File 'lib/jiji/agent/permitter.rb', line 20

def permitter
  @permitter
end

#permitter_allowsObject

Returns the value of attribute permitter_allows.



21
22
23
# File 'lib/jiji/agent/permitter.rb', line 21

def permitter_allows
  @permitter_allows
end

#permitter_proxy_resultObject

Returns the value of attribute permitter_proxy_result.



22
23
24
# File 'lib/jiji/agent/permitter.rb', line 22

def permitter_proxy_result
  @permitter_proxy_result
end

Instance Method Details

#_function_nameObject



15
16
17
18
19
# File 'lib/jiji/agent/permitter.rb', line 15

def _function_name
  if /^(.+?):(\d+)(?::in `(.*)')?/ =~ caller.first
    return $3
  end
end

#permitted_request(*args, &block) ⇒ Object



9
10
11
12
13
14
# File 'lib/jiji/agent/permitter.rb', line 9

def permitted_request( *args, &block )
  r = JIJI::Permitter::Request.new( self, _function_name, args, 
    block, @permitter_allows, @permitter_proxy_result )
  @permitter << r
  return r.wait
end