Class: EverExp::Html
- Inherits:
-
Object
- Object
- EverExp::Html
- Defined in:
- lib/ever_mid/ever_exp.rb
Instance Method Summary collapse
Instance Method Details
#formated_date ⇒ Object
60 61 62 |
# File 'lib/ever_mid/ever_exp.rb', line 60 def formated_date created.strftime '%d %b %Y' end |
#id ⇒ Object
56 57 58 |
# File 'lib/ever_mid/ever_exp.rb', line 56 def id @id ||= Digest::SHA1.hexdigest(title)[0..5] end |
#to_midsrc(src_path) ⇒ Object
47 48 49 50 51 52 53 54 |
# File 'lib/ever_mid/ever_exp.rb', line 47 def to_midsrc src_path refresh_imgs replace_code_blocks set_toc_ref File.open(new_location(src_path), 'w') do |file| file.puts src_content end end |