Class: Evernote2md::Note
- Inherits:
-
Object
- Object
- Evernote2md::Note
- Defined in:
- lib/evernote2md.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(title, text) ⇒ Note
constructor
A new instance of Note.
- #to_text ⇒ Object
Constructor Details
#initialize(title, text) ⇒ Note
Returns a new instance of Note.
20 21 22 23 |
# File 'lib/evernote2md.rb', line 20 def initialize(title, text) @title = title @text = Nokogiri::XML(text).xpath('//en-note').first.text end |
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text.
18 19 20 |
# File 'lib/evernote2md.rb', line 18 def text @text end |
#title ⇒ Object
Returns the value of attribute title.
18 19 20 |
# File 'lib/evernote2md.rb', line 18 def title @title end |
Instance Method Details
#to_text ⇒ Object
25 26 27 |
# File 'lib/evernote2md.rb', line 25 def to_text "#{@title}\n#{@text}" end |