Class: Bunto::Commands::Post::PostFileInfo

Inherits:
Bunto::Compose::FileInfo show all
Defined in:
lib/bunto/commands/post.rb

Instance Attribute Summary

Attributes inherited from Bunto::Compose::FileInfo

#params

Instance Method Summary collapse

Methods inherited from Bunto::Compose::FileInfo

#content, #initialize

Constructor Details

This class inherits a constructor from Bunto::Compose::FileInfo

Instance Method Details

#_date_stampObject



53
54
55
# File 'lib/bunto/commands/post.rb', line 53

def _date_stamp
  @params.date.strftime '%Y-%m-%d'
end

#file_nameObject



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

def file_name
  "#{_date_stamp}-#{super}"
end

#pathObject



45
46
47
# File 'lib/bunto/commands/post.rb', line 45

def path
  "_posts/#{file_name}"
end

#resource_typeObject



41
42
43
# File 'lib/bunto/commands/post.rb', line 41

def resource_type
  'post'
end