Class: Jekyll::Compose::MovementArgParser
- Defined in:
- lib/jekyll-compose/movement_arg_parser.rb
Direct Known Subclasses
Jekyll::Commands::PublishArgParser, Jekyll::Commands::UnpublishArgParser
Instance Attribute Summary
Attributes inherited from ArgParser
Instance Method Summary collapse
Methods inherited from ArgParser
#force?, #initialize, #layout, #source, #timestamp_format, #title, #type
Constructor Details
This class inherits a constructor from Jekyll::Compose::ArgParser
Instance Method Details
#path ⇒ Object
10 11 12 |
# File 'lib/jekyll-compose/movement_arg_parser.rb', line 10 def path File.join(source, args.join(" ")).sub(%r!\A/!, "") end |
#validate! ⇒ Object
6 7 8 |
# File 'lib/jekyll-compose/movement_arg_parser.rb', line 6 def validate! raise ArgumentError, "You must specify a #{resource_type} path." if args.empty? end |