Class: Template::RequiredFile
- Inherits:
- 
      Object
      
        - Object
- Template::RequiredFile
 
- Defined in:
- lib/template/required_file.rb
Instance Attribute Summary collapse
- 
  
    
      #comment  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    , :validation, :validation_hint. 
- 
  
    
      #directory  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    :default_value, :type, :bool_strings. 
- 
  
    
      #name  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    :default_value, :type, :bool_strings. 
Instance Method Summary collapse
- 
  
    
      #initialize(name)  ⇒ RequiredFile 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of RequiredFile. 
Constructor Details
#initialize(name) ⇒ RequiredFile
Returns a new instance of RequiredFile.
| 9 10 11 12 13 14 | # File 'lib/template/required_file.rb', line 9 def initialize(name) raise 'File name required' unless name.length > 0 raise "Invalid characters found in file name (try #{Zaru.sanitize!(name)})" unless Zaru.sanitize!(name) == name self.name = name if name self.directory = '.' end | 
Instance Attribute Details
#comment ⇒ Object
, :validation, :validation_hint
| 7 8 9 | # File 'lib/template/required_file.rb', line 7 def comment @comment end | 
#directory ⇒ Object
:default_value, :type, :bool_strings
| 6 7 8 | # File 'lib/template/required_file.rb', line 6 def directory @directory end | 
#name ⇒ Object
:default_value, :type, :bool_strings
| 6 7 8 | # File 'lib/template/required_file.rb', line 6 def name @name end |