Sha256: ee74dedc6bfbd23ad08d670bfe8164205eaf630806213ad0cc8abf11f823e42b

Contents?: true

Size: 999 Bytes

Versions: 1

Compression:

Stored size: 999 Bytes

Contents

require 'active_support/core_ext/string/inflections'

module Rivendell::API
  class Cart
   
    attr_accessor :number, :type, :group_name, :title, :artist, :album, :year, :label, :client, :agency, :publisher, :composer, :user_defined, :usage_code, :forced_length, :average_length, :length_deviation, :average_segue_lenth, :average_hook_length, :cut_quantity, :last_cut_played, :validity, :enforce_length, :asyncronous, :owner, :metadata_datetime

    def initialize(attributes = {})
      attributes.each { |k,v| send "#{k}=", v }
    end

    def number=(number)
      @number = (number ? number.to_i : nil)
    end

    alias_method :group, :group_name
    alias_method :group=, :group_name=

    def cut_list=(cuts)
      
    end

    def macro_list=(cuts)
      
    end

    def method_missing(name, arguments)
      underscored_name = name.to_s.underscore
      if respond_to?(underscored_name)
        send underscored_name, arguments
      else
        super
      end
    end
 
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rivendell-api-0.0.2 lib/rivendell/api/cart.rb