class Roger::Rogerfile
Loader for rogerfile
Attributes
path[RW]
@attr :path [Pathname] The path of the rogerfile for this project
project[RW]
@attr :path [Pathname] The path of the rogerfile for this project
Public Class Methods
new(project, path = nil)
click to toggle source
# File lib/roger/rogerfile.rb, line 30 def initialize(project, path = nil) @project = project @path = (path && Pathname.new(path)) || Pathname.new(project.path + "Rogerfile") end
Public Instance Methods
load()
click to toggle source
Actually load the rogerfile
# File lib/roger/rogerfile.rb, line 36 def load return unless File.exist?(@path) && !loaded? @source = File.read(@path) context = Context.new(self) eval @source, context.binding, @path.to_s, 1 # rubocop:disable Lint/Eval @loaded = true end
loaded?()
click to toggle source
Wether or not the rogerfile has been loaded
# File lib/roger/rogerfile.rb, line 46 def loaded? @loaded end
release(options = {}) { |release| ... }
click to toggle source
# File lib/roger/rogerfile.rb, line 50 def release(options = {}) release = project.release(options) yield(release) if block_given? release end
serve(options = {}) { |server| ... }
click to toggle source
# File lib/roger/rogerfile.rb, line 56 def serve(options = {}) server = project.server(options) yield(server) if block_given? server end
Also aliased as: server
test(options = {}) { |test| ... }
click to toggle source
# File lib/roger/rogerfile.rb, line 64 def test(options = {}) test = project.test(options) yield(test) if block_given? test end