Class: BaseFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/needle_in_a_haystack/factories/base_factory.rb

Direct Known Subclasses

HaystackFactory

Instance Method Summary collapse

Instance Method Details

#create_tag(name, description) ⇒ Object

Raises:

  • (NotImplementedError)


2
3
4
# File 'lib/needle_in_a_haystack/factories/base_factory.rb', line 2

def create_tag(name, description)
  raise NotImplementedError, "Subclasses must implement a create_tag-method"
end

#create_tagging(tag, taggable) ⇒ Object

Raises:

  • (NotImplementedError)


6
7
8
# File 'lib/needle_in_a_haystack/factories/base_factory.rb', line 6

def create_tagging(tag, taggable)
  raise NotImplementedError, "Subclasses must implement a create_tagging-method"
end

#find_or_create_tag(name, attributes = {}) ⇒ Object

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/needle_in_a_haystack/factories/base_factory.rb', line 10

def find_or_create_tag(name, attributes = {})
  raise NotImplementedError, "Subclasses must implement a find_or_create_tag-method"
end