Class: PkgForge::ForgeDSL

Inherits:
Object
  • Object
show all
Includes:
Contracts::Builtin, Contracts::Core
Defined in:
lib/pkgforge/forgedsl.rb

Overview

DSL for generating a Forge

Instance Method Summary collapse

Constructor Details

#initialize(forge, params = {}) ⇒ ForgeDSL

Returns a new instance of ForgeDSL.



11
12
13
14
15
# File 'lib/pkgforge/forgedsl.rb', line 11

def initialize(forge, params = {})
  @forge = forge
  @options = params
  nil
end

Instance Method Details

#build(&block) ⇒ Object



55
56
57
58
# File 'lib/pkgforge/forgedsl.rb', line 55

def build(&block)
  @forge.build_block = block
  nil
end

#dep(dep_name) ⇒ Object



67
68
69
# File 'lib/pkgforge/forgedsl.rb', line 67

def dep(dep_name)
  @forge.dep(dep_name)
end

#deps(value) ⇒ Object



30
31
32
33
# File 'lib/pkgforge/forgedsl.rb', line 30

def deps(value)
  @forge.deps = value
  nil
end

#flags(value) ⇒ Object



36
37
38
39
# File 'lib/pkgforge/forgedsl.rb', line 36

def flags(value)
  @forge.flags = value
  nil
end

#license(file) ⇒ Object



61
62
63
64
# File 'lib/pkgforge/forgedsl.rb', line 61

def license(file)
  @forge.license = file
  nil
end

#name(value) ⇒ Object



18
19
20
21
# File 'lib/pkgforge/forgedsl.rb', line 18

def name(value)
  @forge.name = value
  nil
end

#org(value) ⇒ Object



24
25
26
27
# File 'lib/pkgforge/forgedsl.rb', line 24

def org(value)
  @forge.org = value
  nil
end

#patch(file) ⇒ Object



48
49
50
51
52
# File 'lib/pkgforge/forgedsl.rb', line 48

def patch(file)
  @forge.patches ||= []
  @forge.patches << file
  nil
end

#version(&block) ⇒ Object



42
43
44
45
# File 'lib/pkgforge/forgedsl.rb', line 42

def version(&block)
  @forge.version_block = block
  nil
end