Class: Jekyll::Commands::PublishArgParser

Inherits:
Jekyll::Compose::MovementArgParser show all
Defined in:
lib/jekyll/commands/publish.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

#dateObject



43
44
45
# File 'lib/jekyll/commands/publish.rb', line 43

def date
  @date ||= options["date"] ? Date.parse(options["date"]) : Time.now
end

#nameObject



47
48
49
# File 'lib/jekyll/commands/publish.rb', line 47

def name
  File.basename path
end

#resource_typeObject



39
40
41
# File 'lib/jekyll/commands/publish.rb', line 39

def resource_type
  "draft"
end