Sha256: b28a08e5cbe4ff694cc62c28f4201302a540e76f52abd16059843d3d01c5b1c9

Contents?: true

Size: 276 Bytes

Versions: 7

Compression:

Stored size: 276 Bytes

Contents

require 'ostruct'

module FSR
  module Model
    class Channel < OpenStruct
      def initialize(fields, *data)
        super(Hash[fields.zip(data)])
      end

      def fields
        raise NotImplementedError, "This class is now an OpenStruct"
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
freeswitcher-0.5.11 lib/fsr/model/channel.rb
freeswitcher-0.5.10 lib/fsr/model/channel.rb
freeswitcher-0.5.9 lib/fsr/model/channel.rb
freeswitcher-0.5.8 lib/fsr/model/channel.rb
freeswitcher-0.5.7 lib/fsr/model/channel.rb
freeswitcher-0.5.6 lib/fsr/model/channel.rb
freeswitcher-0.5.5 lib/fsr/model/channel.rb