Class: Aspen::Actions::Compile
- Inherits:
-
Object
- Object
- Aspen::Actions::Compile
- Defined in:
- lib/aspen/actions/compile.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(path, options = {}) ⇒ Compile
constructor
A new instance of Compile.
Constructor Details
#initialize(path, options = {}) ⇒ Compile
Returns a new instance of Compile.
7 8 9 10 11 12 13 |
# File 'lib/aspen/actions/compile.rb', line 7 def initialize(path, = {}) @path = path @basename = File.basename(@path, ".aspen") dir = File.dirname(@path) @dest = File.("#{@basename}.cql", dir) @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/aspen/actions/compile.rb', line 5 def @options end |
Instance Method Details
#call ⇒ Object
15 16 17 18 |
# File 'lib/aspen/actions/compile.rb', line 15 def call compile_to_file send_to_database if .fetch(:database, false) end |