Class: Tumugi::Plugin::FileSystemTarget
- Defined in:
- lib/tumugi/plugin/file_system_target.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #exist? ⇒ Boolean
- #fs ⇒ Object
-
#initialize(path) ⇒ FileSystemTarget
constructor
A new instance of FileSystemTarget.
- #open(mode = "r") ⇒ Object
- #remove ⇒ Object
- #to_s ⇒ Object
Methods inherited from Target
Constructor Details
#initialize(path) ⇒ FileSystemTarget
Returns a new instance of FileSystemTarget.
10 11 12 |
# File 'lib/tumugi/plugin/file_system_target.rb', line 10 def initialize(path) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
8 9 10 |
# File 'lib/tumugi/plugin/file_system_target.rb', line 8 def path @path end |
Instance Method Details
#exist? ⇒ Boolean
21 22 23 |
# File 'lib/tumugi/plugin/file_system_target.rb', line 21 def exist? fs.exist?(@path) end |
#fs ⇒ Object
14 15 16 |
# File 'lib/tumugi/plugin/file_system_target.rb', line 14 def fs raise NotImplementedError, "You must implement #{self.class}##{__method__}" end |
#open(mode = "r") ⇒ Object
18 19 |
# File 'lib/tumugi/plugin/file_system_target.rb', line 18 def open(mode="r") end |
#remove ⇒ Object
25 26 27 |
# File 'lib/tumugi/plugin/file_system_target.rb', line 25 def remove fs.remove(@path) end |
#to_s ⇒ Object
29 30 31 |
# File 'lib/tumugi/plugin/file_system_target.rb', line 29 def to_s path end |