Sha256: 03b54a2fcb969ac0e9226f325f7e1d78305c3d1e0d0070e438437ce24615843d

Contents?: true

Size: 694 Bytes

Versions: 11

Compression:

Stored size: 694 Bytes

Contents

# -*- coding: utf-8 -*-
require 'tengine/core'

class Tengine::Core::Session
  include Mongoid::Document
  include Mongoid::Timestamps
  include Tengine::Core::CollectionAccessible
  include Tengine::Core::OptimisticLock

  field :lock_version, :type => Integer, :default => 1
  field :properties, :type => Hash, :default => {}
  map_yaml_accessor :properties
  field :system_properties, :type => Hash, :default => {}
  map_yaml_accessor :system_properties

  has_one :driver, :class_name => "Tengine::Core::Driver"

  # 元々の[]と[]=メソッドをオーバーライドしているので要注意
  def [](key); properties[key]; end
  def []=(key, value); properties[key] = value; end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
tengine_core-0.5.39 lib/tengine/core/session.rb
tengine_core-0.5.38 lib/tengine/core/session.rb
tengine_core-0.5.37 lib/tengine/core/session.rb
tengine_core-0.5.36 lib/tengine/core/session.rb
tengine_core-0.5.35 lib/tengine/core/session.rb
tengine_core-0.5.34 lib/tengine/core/session.rb
tengine_core-0.5.33 lib/tengine/core/session.rb
tengine_core-0.5.32 lib/tengine/core/session.rb
tengine_core-0.5.31 lib/tengine/core/session.rb
tengine_core-0.5.30 lib/tengine/core/session.rb
tengine_core-0.5.28 lib/tengine/core/session.rb