Sha256: c2ae5967451508db1da0fee75536aa45e3a31164e19e3cafb4fa60cfa2c6b39e

Contents?: true

Size: 360 Bytes

Versions: 1

Compression:

Stored size: 360 Bytes

Contents

# -*- coding: utf-8 -*-
require 'libgss'

require 'forwardable'

module Libgss

  class Outputs
    extend Forwardable

    def initialize(array)
      @array = array
    end

    # メソッドを@arrayに移譲する
    def_delegators :@array, :[], :length, :first, :last

    def get(id)
      @array.detect{|output| output["id"] == id}
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
libgss-0.0.1 lib/libgss/outputs.rb