Class: Bunto::Commands::DraftMovementInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/bunto/commands/publish.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#paramsObject (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

#fromObject



49
50
51
# File 'lib/bunto/commands/publish.rb', line 49

def from
  params.path
end

#toObject



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