Class: Ruboty::Dsl

Inherits:
Object
  • Object
show all
Defined in:
lib/ruboty/dsl/dsl.rb

Overview

Dsl

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDsl

Returns a new instance of Dsl.



36
37
38
39
40
41
42
43
44
45
# File 'lib/ruboty/dsl/dsl.rb', line 36

def initialize
  @ruboty_megen = Ruboty::DslModel.new
  @ruboty_megen.user_name = 'your github username'
  @ruboty_megen.gem_class_name = 'your_gem_class_name'
  @ruboty_megen.gem_name = 'your_gem_name'
  @ruboty_megen.title = 'title'
  @ruboty_megen.env = []
  @ruboty_megen.dependencies = []
  @ruboty_megen.commands = []
end

Instance Attribute Details

#ruboty_megenObject

Returns the value of attribute ruboty_megen.



10
11
12
# File 'lib/ruboty/dsl/dsl.rb', line 10

def ruboty_megen
  @ruboty_megen
end

Instance Method Details

#command {|c| ... } ⇒ Object

Yields:

  • (c)


30
31
32
33
34
# File 'lib/ruboty/dsl/dsl.rb', line 30

def command
  c = Ruboty::Models::Command.new
  yield(c)
  @ruboty_megen.commands << c
end

#dependency {|d| ... } ⇒ Object

Yields:

  • (d)


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

def dependency
  d = Ruboty::Models::Dependency.new
  yield(d)
  @ruboty_megen.dependencies << d
end

#env {|e| ... } ⇒ Object

Yields:

  • (e)


18
19
20
21
22
# File 'lib/ruboty/dsl/dsl.rb', line 18

def env
  e = Ruboty::Models::Env.new
  yield(e)
  @ruboty_megen.env << e
end