Class: Jekyll::Commands::UnpublishArgParser

Inherits:
Jekyll::Compose::MovementArgParser show all
Defined in:
lib/jekyll/commands/unpublish.rb

Instance Attribute Summary

Attributes inherited from Jekyll::Compose::ArgParser

#args, #config, #options

Instance Method Summary collapse

Methods inherited from Jekyll::Compose::MovementArgParser

#path, #validate!

Methods inherited from Jekyll::Compose::ArgParser

#force?, #initialize, #layout, #source, #timestamp_format, #title, #type, #validate!

Constructor Details

This class inherits a constructor from Jekyll::Compose::ArgParser

Instance Method Details

#nameObject



41
42
43
# File 'lib/jekyll/commands/unpublish.rb', line 41

def name
  File.basename(path).sub %r!\d{4}-\d{2}-\d{2}-!, ""
end

#resource_typeObject



37
38
39
# File 'lib/jekyll/commands/unpublish.rb', line 37

def resource_type
  "post"
end