Sha256: 0a65015da489afae27faf8fb63f771d4cbe74b7f0cc83b1f66c9282138d4b06c

Contents?: true

Size: 433 Bytes

Versions: 9

Compression:

Stored size: 433 Bytes

Contents

module Leap
  # Provides an intelligent accessor method for a subject instance's deliberations.
  # @see Leap::Subject
  module DeliberationsAccessor
    # Returns a special hash of deliberations that will make necessary decisions if they have not yet been made.
    def deliberations
      @deliberations ||= Hash.new do |h, k|
        return nil unless respond_to? k
        send k
        h[k]
      end
    end
  end
end
      

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
leap-0.5.8 lib/leap/deliberations_accessor.rb
leap-0.5.7 lib/leap/deliberations_accessor.rb
leap-0.5.6 lib/leap/deliberations_accessor.rb
leap-0.5.5 lib/leap/deliberations_accessor.rb
leap-0.5.4 lib/leap/deliberations_accessor.rb
leap-0.5.3 lib/leap/deliberations_accessor.rb
leap-0.5.2 lib/leap/deliberations_accessor.rb
leap-0.5.1 lib/leap/deliberations_accessor.rb
leap-0.5.0 lib/leap/deliberations_accessor.rb