Method: Fire::Session#script

Defined in:
lib/fire/session.rb

#scriptObject Also known as: scripts

Default rules script is the first file matching .fire/rules.rb or rules.rb from the the project’s root directory. The easiest way to customize this is to use .fire/rules.rb and use import to load which ever files you prefer, e.g. ‘import “task/*.fire”`.

@return [Array] List of file paths.



91
92
93
94
95
96
# File 'lib/fire/session.rb', line 91

def script
  @script ||= (
    glob = File.join(root, '{.fire/rules.rb,rules.rb}')
    Dir.glob(glob, File::FNM_CASEFOLD).first
  )
end