Class: Dustcart::Resource::Input::FileBase
- Defined in:
- lib/dustcart/input/file_base.rb
Overview
base class for file system input
Instance Attribute Summary collapse
-
#from ⇒ Object
readonly
Returns the value of attribute from.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(to_dir, from, &block) ⇒ FileBase
constructor
A new instance of FileBase.
- #precheck ⇒ Object
Methods inherited from Base
define_attribute, inherited, #method_missing, #respond_to_missing?, #run
Constructor Details
#initialize(to_dir, from, &block) ⇒ FileBase
Returns a new instance of FileBase.
8 9 10 11 |
# File 'lib/dustcart/input/file_base.rb', line 8 def initialize(to_dir, from, &block) super(to_dir, &block) @from = from end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Dustcart::Resource::Base
Instance Attribute Details
#from ⇒ Object (readonly)
Returns the value of attribute from.
6 7 8 |
# File 'lib/dustcart/input/file_base.rb', line 6 def from @from end |
Instance Method Details
#precheck ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/dustcart/input/file_base.rb', line 13 def precheck super raise " target(\#{from}) does not exists\n EOS\nend\n".unindent unless Object::File.exists?(from) |