Sha256: e5f3cd617b4ebb4b006ae1cefac0f588898031bc515d0062e9c43515fc763028

Contents?: true

Size: 956 Bytes

Versions: 28

Compression:

Stored size: 956 Bytes

Contents

module TicketMaster::Provider
  module Dummy
    # This is the Comment class for the Dummy provider
    class Comment < TicketMaster::Provider::Base::Comment
      
            
      def self.find_by_id(id)
        self.new({:id => id})
      end
      
      def self.find_by_attributes(*options)
        [self.new(*options)]
      end
            
      # You don't need to define an initializer, this is only here to initialize dummy data
      def initialize(project_id, ticket_id, *options)
        data = {:id => rand(1000), :status => ['lol', 'rofl', 'lmao', 'lamo', 'haha', 'heh'][rand(6)],
          :priority => rand(10), :summary => 'Tickets ticket ticket ticket', :resolution => false,
          :created_at => Time.now, :updated_at => Time.now, :description => 'Ticket ticket ticket ticket laughing',
          :assignee => 'lol-man'}
        @system = :dummy
        super(data.merge(options.first || {}))
      end
      
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
ticketmaster-0.7.0 lib/ticketmaster/dummy/comment.rb
ticketmaster-0.6.10 lib/ticketmaster/dummy/comment.rb
ticketmaster-0.6.9 lib/ticketmaster/dummy/comment.rb
ticketmaster-0.6.8 lib/ticketmaster/dummy/comment.rb
ticketmaster-0.6.7 lib/ticketmaster/dummy/comment.rb
ticketmaster-0.6.6 lib/ticketmaster/dummy/comment.rb
ticketmaster-0.5.6 lib/ticketmaster/dummy/comment.rb
ticketmaster-0.5.5 lib/ticketmaster/dummy/comment.rb
ticketmaster-0.5.3 lib/ticketmaster/dummy/comment.rb
ticketmaster-0.5.2 lib/ticketmaster/dummy/comment.rb
ticketmaster-0.5.1 lib/ticketmaster/dummy/comment.rb
ticketmaster-0.5.0 lib/ticketmaster/dummy/comment.rb
ticketmaster-0.4.9 lib/ticketmaster/dummy/comment.rb
ticketmaster-0.4.8 lib/ticketmaster/dummy/comment.rb
ticketmaster-0.4.7 lib/ticketmaster/dummy/comment.rb
ticketmaster-0.4.6 lib/ticketmaster/dummy/comment.rb
ticketmaster-0.4.5 lib/ticketmaster/dummy/comment.rb
ticketmaster-0.4.3 lib/ticketmaster/dummy/comment.rb
ticketmaster-0.4.2 lib/ticketmaster/dummy/comment.rb
ticketmaster-0.4.1 lib/ticketmaster/dummy/comment.rb