Class: Sycsvpro::ScriptCreator
- Inherits:
- 
      Object
      
        - Object
- Sycsvpro::ScriptCreator
 
- Defined in:
- lib/sycsvpro/script_creator.rb
Overview
Creates a ruby script scaffold
Instance Attribute Summary collapse
- 
  
    
      #dir  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Directory of the script files. 
- 
  
    
      #method_name  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Method name. 
- 
  
    
      #script_file  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    script_file path. 
- 
  
    
      #script_name  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Script name. 
- 
  
    
      #script_type  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    type of the script-file. 
Instance Method Summary collapse
- 
  
    
      #initialize(options = {})  ⇒ ScriptCreator 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    Creates a new ScriptCreator. 
Constructor Details
#initialize(options = {}) ⇒ ScriptCreator
Creates a new ScriptCreator
| 19 20 21 22 23 24 25 | # File 'lib/sycsvpro/script_creator.rb', line 19 def initialize(={}) @dir = File.join([:dir], 'scripts') @script_name = [:script] @script_type = File.extname(@script_name) @method_name = [:method] if @script_type == '.rb' create_script end | 
Instance Attribute Details
#dir ⇒ Object (readonly)
Directory of the script files
| 8 9 10 | # File 'lib/sycsvpro/script_creator.rb', line 8 def dir @dir end | 
#method_name ⇒ Object (readonly)
Method name
| 12 13 14 | # File 'lib/sycsvpro/script_creator.rb', line 12 def method_name @method_name end | 
#script_file ⇒ Object (readonly)
script_file path
| 14 15 16 | # File 'lib/sycsvpro/script_creator.rb', line 14 def script_file @script_file end | 
#script_name ⇒ Object (readonly)
Script name
| 10 11 12 | # File 'lib/sycsvpro/script_creator.rb', line 10 def script_name @script_name end | 
#script_type ⇒ Object (readonly)
type of the script-file
| 16 17 18 | # File 'lib/sycsvpro/script_creator.rb', line 16 def script_type @script_type end |