class Ruboty::Dsl

Dsl

Attributes

ruboty_generator[RW]

Public Class Methods

new() click to toggle source
# File lib/ruboty/dsl/dsl.rb, line 29
def initialize
  @ruboty_generator = Ruboty::DslModel.new
  @ruboty_generator.user_name = 'your github username'
  @ruboty_generator.gem_class_name = 'your_gem_class_name'
  @ruboty_generator.gem_name = 'your_gem_name'
  @ruboty_generator.description = 'description'
  @ruboty_generator.env = []
  @ruboty_generator.commands = []
end

Public Instance Methods

command() { |c| ... } click to toggle source
# File lib/ruboty/dsl/dsl.rb, line 23
def command
  c = Ruboty::Models::Command.new
  yield(c)
  @ruboty_generator.commands << c
end
env() { |e| ... } click to toggle source
# File lib/ruboty/dsl/dsl.rb, line 17
def env
  e = Ruboty::Models::Env.new
  yield(e)
  @ruboty_generator.env << e
end
to_s() click to toggle source
# File lib/ruboty/dsl/dsl.rb, line 39
    def to_s
      <<-EOS
user_name = #{@ruboty_generator.user_name}
gem_class_name = #{@ruboty_generator.gem_class_name}
gem_name = #{@ruboty_generator.gem_name}
description = #{@ruboty_generator.description}
env = #{@ruboty_generator.env}
commands = #{@ruboty_generator.commands}
      EOS
    end