Class: Jekyll::Commands::DraftMovementInfo
- Inherits:
-
Object
- Object
- Jekyll::Commands::DraftMovementInfo
- Defined in:
- lib/jekyll/commands/publish.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #from ⇒ Object
- #front_matter(data) ⇒ Object
-
#initialize(params) ⇒ DraftMovementInfo
constructor
A new instance of DraftMovementInfo.
- #to ⇒ Object
Constructor Details
#initialize(params) ⇒ DraftMovementInfo
Returns a new instance of DraftMovementInfo.
54 55 56 |
# File 'lib/jekyll/commands/publish.rb', line 54 def initialize(params) @params = params end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
53 54 55 |
# File 'lib/jekyll/commands/publish.rb', line 53 def params @params end |
Instance Method Details
#from ⇒ Object
58 59 60 |
# File 'lib/jekyll/commands/publish.rb', line 58 def from params.path end |
#front_matter(data) ⇒ Object
67 68 69 70 |
# File 'lib/jekyll/commands/publish.rb', line 67 def front_matter(data) data["date"] ||= params.date.strftime(params.) data end |
#to ⇒ Object
62 63 64 65 |
# File 'lib/jekyll/commands/publish.rb', line 62 def to date_stamp = params.date.strftime Jekyll::Compose::DEFAULT_DATESTAMP_FORMAT "_posts/#{date_stamp}-#{params.name}" end |