Class: MTIF
- Inherits:
-
Object
- Object
- MTIF
- Defined in:
- lib/mtif.rb,
lib/mtif/posts.rb,
lib/mtif/version.rb
Overview
Defined Under Namespace
Classes: Post
Constant Summary collapse
- VERSION =
"0.0.2"
Instance Attribute Summary collapse
-
#posts ⇒ Object
Returns the value of attribute posts.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(content) ⇒ MTIF
constructor
A new instance of MTIF.
- #save_file(filename) ⇒ Object
- #to_mtif ⇒ Object
Constructor Details
Instance Attribute Details
#posts ⇒ Object
Returns the value of attribute posts.
7 8 9 |
# File 'lib/mtif.rb', line 7 def posts @posts end |
Class Method Details
Instance Method Details
#save_file(filename) ⇒ Object
25 26 27 28 29 |
# File 'lib/mtif.rb', line 25 def save_file(filename) mtif_file = File.open(filename, 'w') mtif_file << self.to_mtif mtif_file.close end |
#to_mtif ⇒ Object
21 22 23 |
# File 'lib/mtif.rb', line 21 def to_mtif posts.map(&:to_mtif).join end |