class Arcana::Magdir
Public Class Methods
new(dir)
click to toggle source
# File lib/arcana.rb, line 521 def initialize(dir) @dir = dir end
Public Instance Methods
files()
click to toggle source
# File lib/arcana.rb, line 529 def files Dir.children(@dir).map do |path| open(path) end end
open(path)
click to toggle source
# File lib/arcana.rb, line 525 def open(path) Arcana::File.new(::File.join(@dir, path)) end
rules()
click to toggle source
# File lib/arcana.rb, line 535 def rules RuleSet.new(files.flat_map(&:raw_rules)) end