Sha256: b9d45e48edbf83f2eb67264343dabb759f7d8205cc0747855a22d1aa9abf77aa

Contents?: true

Size: 379 Bytes

Versions: 2

Compression:

Stored size: 379 Bytes

Contents

module Larynx
  class Session
    attr_reader :variables

    def initialize(data)
      @variables = data
    end

    def method_missing(method, *args, &block)
      if @variables.has_key?(method.to_sym)
        @variables[method.to_sym]
      end
    end

    def []=(key, value)
      @variables[key] = value
    end

    def [](key)
      @variables[key]
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
larynx-0.1.6 lib/larynx/session.rb
larynx-0.1.5 lib/larynx/session.rb