Sha256: 8ebba54b5811034fe3956e7b239003a05c1a5bf20fd958fbcb611b9bc70097c8

Contents?: true

Size: 316 Bytes

Versions: 5

Compression:

Stored size: 316 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)
      @variables[key]
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
larynx-0.1.4 lib/larynx/session.rb
larynx-0.1.3 lib/larynx/session.rb
larynx-0.1.2 lib/larynx/session.rb
larynx-0.1.1 lib/larynx/session.rb
larynx-0.1.0 lib/larynx/session.rb