Class: Session

Inherits:
Entity show all
Defined in:
lib/qooxview/helpers/session.rb

Instance Attribute Summary collapse

Attributes inherited from Entity

#changed, #id, #show_error_missing

Instance Method Summary collapse

Methods inherited from Entity

#data, #data_get, #data_set, #data_set_hash, #delete, #get_unique, #init_instance, #initialize, #inspect, #method_missing, #old_respond_to?, #respond_to?, #to_a, #to_frontend, #to_hash, #true

Constructor Details

This class inherits a constructor from Entity

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Entity

Instance Attribute Details

#client_ipObject

Returns the value of attribute client_ip.



51
52
53
# File 'lib/qooxview/helpers/session.rb', line 51

def client_ip
  @client_ip
end

#web_reqObject

Returns the value of attribute web_req.



51
52
53
# File 'lib/qooxview/helpers/session.rb', line 51

def web_req
  @web_req
end

Instance Method Details

#can_view(v) ⇒ Object



59
60
61
62
63
# File 'lib/qooxview/helpers/session.rb', line 59

def can_view(v)
  dputs(3) { "Owner is #{owner.inspect}" }
  perms = owner ? owner.permissions : nil
  return Permission.can_view(perms, v)
end

#closeObject



65
66
67
# File 'lib/qooxview/helpers/session.rb', line 65

def close
  self.delete
end

#setup_instanceObject



53
54
55
56
57
# File 'lib/qooxview/helpers/session.rb', line 53

def setup_instance
  @web_req = nil
  @client_ip = nil
  self.s_data ||= {}
end