Class: Bunto::Commands::DraftMovementInfo
- Inherits:
-
Object
- Object
- Bunto::Commands::DraftMovementInfo
- Defined in:
- lib/bunto/commands/publish.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #from ⇒ Object
-
#initialize(params) ⇒ DraftMovementInfo
constructor
A new instance of DraftMovementInfo.
- #to ⇒ Object
Constructor Details
#initialize(params) ⇒ DraftMovementInfo
Returns a new instance of DraftMovementInfo.
45 46 47 |
# File 'lib/bunto/commands/publish.rb', line 45 def initialize(params) @params = params end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
44 45 46 |
# File 'lib/bunto/commands/publish.rb', line 44 def params @params end |
Instance Method Details
#from ⇒ Object
49 50 51 |
# File 'lib/bunto/commands/publish.rb', line 49 def from params.path end |
#to ⇒ Object
53 54 55 56 |
# File 'lib/bunto/commands/publish.rb', line 53 def to date_stamp = params.date.strftime '%Y-%m-%d' "_posts/#{date_stamp}-#{params.name}" end |