Class: Protod::RakeTask::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/protod/rake_task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&body) ⇒ Builder

Returns a new instance of Builder.



9
10
11
# File 'lib/protod/rake_task.rb', line 9

def initialize(&body)
  body&.call(self)
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



7
8
9
# File 'lib/protod/rake_task.rb', line 7

def name
  @name
end

Instance Method Details

#buildObject



13
14
15
# File 'lib/protod/rake_task.rb', line 13

def build
  Protod::RakeTask.new(**{ name: name }.compact)
end