add Application class; update CLI and Script for new architecture
This commit is contained in:
1 parent
ea6ae1be10
commit
ac89a122d8
8 files changed
+199
-164
No files matched your search
+22
-14
@@ -4,22 +4,30 @@ module Rscons
|
||||
# the DSL for the build script to use.
|
||||
class Script
|
||||
|
||||
class << self
|
||||
# @return [String, nil]
|
||||
# Project name.
|
||||
attr_accessor :project_name
|
||||
|
||||
# Load a script from the specified file.
|
||||
#
|
||||
# @param path [String]
|
||||
# File name of the rscons script to load.
|
||||
#
|
||||
# @return [Script]
|
||||
# The loaded script state.
|
||||
def load(path)
|
||||
script_contents = File.read(path, mode: "rb")
|
||||
script = Script.new
|
||||
script.instance_eval(script_contents, path, 1)
|
||||
script
|
||||
end
|
||||
# @return [Boolean]
|
||||
# Whether to autoconfigure if the user does not explicitly perform a
|
||||
# configure operation before building (default: true).
|
||||
attr_accessor :autoconf
|
||||
|
||||
# Construct a Script.
|
||||
def initialize
|
||||
@project_name = nil
|
||||
@autoconf = true
|
||||
end
|
||||
|
||||
# Load a script from the specified file.
|
||||
#
|
||||
# @param path [String]
|
||||
# File name of the rscons script to load.
|
||||
#
|
||||
# @return [void]
|
||||
def load(path)
|
||||
script_contents = File.read(path, mode: "rb")
|
||||
self.instance_eval(script_contents, path, 1)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user