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
59 60 61 |
# File 'lib/ever_mid/ever_exp.rb', line 59 def formated_date created.strftime '%d %b %Y' end |
#id ⇒ Object
55 56 57 |
# File 'lib/ever_mid/ever_exp.rb', line 55 def id @id ||= Digest::SHA1.hexdigest(title)[0..5] end |
#to_midsrc(src_path) ⇒ Object
46 47 48 49 50 51 52 53 |
# File 'lib/ever_mid/ever_exp.rb', line 46 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 |