Class: Thor::Tree::Directory
- Includes:
- Actions
- Defined in:
- lib/thor/tree/directory.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args, options = {}, config = {}) ⇒ Directory
constructor
A new instance of Directory.
Constructor Details
#initialize(args, options = {}, config = {}) ⇒ Directory
Returns a new instance of Directory.
15 16 17 18 19 |
# File 'lib/thor/tree/directory.rb', line 15 def initialize(args, = {}, config = {}) @path = Path.new args.first.to_s super self.destination_root = Writer.root_path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/thor/tree/directory.rb', line 6 def path @path end |
Class Method Details
.===(args) ⇒ Object
9 10 11 12 |
# File 'lib/thor/tree/directory.rb', line 9 def ===(args) args.is_a?(Hash) && (args.empty? || args.keys.all? { |key| key.start_with?(':') == false }) end |