Class: Ruboty::Dsl
- Inherits:
-
Object
- Object
- Ruboty::Dsl
- Defined in:
- lib/ruboty/dsl/dsl.rb
Overview
Dsl
Instance Attribute Summary collapse
-
#ruboty_megen ⇒ Object
Returns the value of attribute ruboty_megen.
Instance Method Summary collapse
- #command {|c| ... } ⇒ Object
- #dependency {|d| ... } ⇒ Object
- #env {|e| ... } ⇒ Object
-
#initialize ⇒ Dsl
constructor
A new instance of Dsl.
Constructor Details
#initialize ⇒ Dsl
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_megen ⇒ Object
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
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
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
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 |