Class: FSR::Model::Channel

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/fsr/model/channel.rb

Instance Method Summary collapse

Methods inherited from OpenStruct

#to_hash, #to_json

Constructor Details

#initialize(fields, *data) ⇒ Channel

Returns a new instance of Channel.



5
6
7
# File 'lib/fsr/model/channel.rb', line 5

def initialize(fields, *data)
  super(Hash[fields.zip(data)])
end

Instance Method Details

#fieldsObject

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/fsr/model/channel.rb', line 9

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