Module: Kickstart::Keywords

Defined in:
lib/keywords.rb

Instance Method Summary collapse

Instance Method Details

#controller(name, *args) {|controller| ... } ⇒ Object

call to create a controller

Yields:



17
18
19
20
21
# File 'lib/keywords.rb', line 17

def controller(name, *args, &blk)
  controller = Controller.new(name)
  yield(controller)
  controller.generate
end

#model(name, *args) {|model| ... } ⇒ Object

call to create a model

Yields:



24
25
26
27
28
# File 'lib/keywords.rb', line 24

def model(name, *args, &blk)
  model = Model.new(name)
  yield(model)
  model.generate
end

#resource(name, *args) {|resource| ... } ⇒ Object

call to create a resource

Yields:



10
11
12
13
14
# File 'lib/keywords.rb', line 10

def resource(name, *args, &blk)
  resource = Resource.new(name)
  yield(resource)
  resource.generate
end