Class: TicketMaster::Provider::Dummy::Comment
- Inherits:
-
Base::Comment
- Object
- Hashie::Mash
- Base::Comment
- TicketMaster::Provider::Dummy::Comment
- Defined in:
- lib/ticketmaster/dummy/comment.rb
Overview
This is the Comment class for the Dummy provider
Constant Summary
Constants inherited from Base::Comment
Instance Attribute Summary
Attributes inherited from Base::Comment
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(project_id, ticket_id, *options) ⇒ Comment
constructor
You don’t need to define an initializer, this is only here to initialize dummy data.
Methods inherited from Base::Comment
Methods included from Helper
#easy_finder, #filter_string, #provider_parent, #search_by_attribute, #search_filter, #this_method
Methods included from Common
#destroy, included, #respond_to?, #save, #update!
Constructor Details
#initialize(project_id, ticket_id, *options) ⇒ Comment
You don’t need to define an initializer, this is only here to initialize dummy data
16 17 18 19 20 21 22 23 |
# File 'lib/ticketmaster/dummy/comment.rb', line 16 def initialize(project_id, ticket_id, *) 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(.first || {})) end |
Class Method Details
.find_by_attributes(*options) ⇒ Object
11 12 13 |
# File 'lib/ticketmaster/dummy/comment.rb', line 11 def self.find_by_attributes(*) [self.new(*)] end |
.find_by_id(id) ⇒ Object
7 8 9 |
# File 'lib/ticketmaster/dummy/comment.rb', line 7 def self.find_by_id(id) self.new({:id => id}) end |