Module: Quill::DSL

Defined in:
lib/quill/dsl.rb

Instance Method Summary collapse

Instance Method Details

#curried(value = true) ⇒ Object



22
23
24
# File 'lib/quill/dsl.rb', line 22

def curried(value = true)
  @curried = value
end

#depends(*dependency_names) ⇒ Object



18
19
20
# File 'lib/quill/dsl.rb', line 18

def depends(*dependency_names)
  @dependencies = dependency_names
end

#factoryObject



5
6
7
8
9
10
11
12
# File 'lib/quill/dsl.rb', line 5

def factory
  raise "You must specify a feature provided by the class" unless provided_feature
  @factory ||= Quill::Factory.new(self, {
    :feature => provided_feature,
    :dependencies => @dependencies || [],
    :curried => curried?
  })
end

#provides(feature_name) ⇒ Object



14
15
16
# File 'lib/quill/dsl.rb', line 14

def provides(feature_name)
  @provided_feature = feature_name
end