Class: Trax::Core::FS::CurrentFileDirectory
- Includes:
- Enumerable
- Defined in:
- lib/trax/core/fs.rb
Direct Known Subclasses
Instance Attribute Summary collapse
- 
  
    
      #directory  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute directory. 
- 
  
    
      #path  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute path. 
Class Method Summary collapse
Instance Method Summary collapse
- #__getobj__ ⇒ Object
- #each {|@directory| ... } ⇒ Object
- 
  
    
      #initialize  ⇒ CurrentFileDirectory 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of CurrentFileDirectory. 
Methods included from Enumerable
Constructor Details
#initialize ⇒ CurrentFileDirectory
Returns a new instance of CurrentFileDirectory.
| 165 166 167 168 169 | # File 'lib/trax/core/fs.rb', line 165 def initialize source_file_path = caller[3].partition(":")[0] @path = ::Pathname.new(::File.dirname(source_file_path)) @directory = ::Trax::Core::FS::Directory.new(@path) end | 
Instance Attribute Details
#directory ⇒ Object
Returns the value of attribute directory.
| 163 164 165 | # File 'lib/trax/core/fs.rb', line 163 def directory @directory end | 
#path ⇒ Object
Returns the value of attribute path.
| 163 164 165 | # File 'lib/trax/core/fs.rb', line 163 def path @path end | 
Class Method Details
.[](path) ⇒ Object
| 158 159 160 161 | # File 'lib/trax/core/fs.rb', line 158 def self.[](path) file_path = path.is_a?(::Pathname) ? path : ::Pathname.new(path) new(file_path) end |