Class: Jekyll::Commands::PostMovementInfo
- Inherits:
-
Object
- Object
- Jekyll::Commands::PostMovementInfo
- Defined in:
- lib/jekyll/commands/unpublish.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) ⇒ PostMovementInfo
constructor
A new instance of PostMovementInfo.
- #to ⇒ Object
Constructor Details
#initialize(params) ⇒ PostMovementInfo
Returns a new instance of PostMovementInfo.
48 49 50 |
# File 'lib/jekyll/commands/unpublish.rb', line 48 def initialize(params) @params = params end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
47 48 49 |
# File 'lib/jekyll/commands/unpublish.rb', line 47 def params @params end |
Instance Method Details
#from ⇒ Object
52 53 54 |
# File 'lib/jekyll/commands/unpublish.rb', line 52 def from params.path end |
#front_matter(data) ⇒ Object
60 61 62 |
# File 'lib/jekyll/commands/unpublish.rb', line 60 def front_matter(data) data.reject { |key, _value| key == "date" } end |
#to ⇒ Object
56 57 58 |
# File 'lib/jekyll/commands/unpublish.rb', line 56 def to "_drafts/#{params.name}" end |