Class: OasContrib::Resolver::Divide
- Defined in:
- lib/oas_contrib/resolver/divide.rb
Overview
Divide command resolver class
Constant Summary
Constants inherited from Base
Base::DEFINED_FILE_EXT, Base::DIR_NAME_META, Base::DIR_NAME_MODEL, Base::DIR_NAME_PATH
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#distribute ⇒ Boolean
Distribute the command artifacts.
-
#initialize(infile, outdir, options) ⇒ Divide
constructor
Initialize.
-
#load ⇒ Boolean
Load and parse the input file.
-
#setup ⇒ Boolean
Setup the resolver object.
Methods inherited from Base
#file_ext_check, #input, #input_dir, #input_lambda, #output, #resolve, #v2?, #v3?
Methods included from Interface::Resolver
Constructor Details
#initialize(infile, outdir, options) ⇒ Divide
Initialize
11 12 13 14 15 16 17 |
# File 'lib/oas_contrib/resolver/divide.rb', line 11 def initialize(infile, outdir, ) @meta_dir = outdir + '/' + DIR_NAME_META @path_dir = outdir + '/' + DIR_NAME_PATH @model_dir = outdir + '/' + DIR_NAME_MODEL @infile = infile @outfile_ext = ['out_ext'] end |
Instance Method Details
#distribute ⇒ Boolean
Distribute the command artifacts.
36 37 38 39 40 41 |
# File 'lib/oas_contrib/resolver/divide.rb', line 36 def distribute output_dir(@spec., @meta_dir) output_dir(@spec.path, @path_dir) output_dir(@spec.model, @model_dir) true end |
#load ⇒ Boolean
Load and parse the input file.
29 30 31 32 |
# File 'lib/oas_contrib/resolver/divide.rb', line 29 def load input(@infile) true end |
#setup ⇒ Boolean
Setup the resolver object.
21 22 23 24 25 |
# File 'lib/oas_contrib/resolver/divide.rb', line 21 def setup @infile_ext = File.extname(@infile) file_ext_check true end |