Class: Markio::Builder
- Inherits:
-
Object
- Object
- Markio::Builder
- Defined in:
- lib/markio/builder.rb
Instance Attribute Summary collapse
-
#bookmarks ⇒ Object
Returns the value of attribute bookmarks.
Instance Method Summary collapse
- #build_file(file) ⇒ Object
- #build_string ⇒ Object
-
#initialize(options = {}) ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
#initialize(options = {}) ⇒ Builder
Returns a new instance of Builder.
7 8 9 10 |
# File 'lib/markio/builder.rb', line 7 def initialize( = {}) @title = [:title] || 'Bookmarks' @bookmarks = [] end |
Instance Attribute Details
#bookmarks ⇒ Object
Returns the value of attribute bookmarks.
5 6 7 |
# File 'lib/markio/builder.rb', line 5 def bookmarks @bookmarks end |
Instance Method Details
#build_file(file) ⇒ Object
16 17 18 19 20 |
# File 'lib/markio/builder.rb', line 16 def build_file(file) File.new(file, 'w') do |f| f.write build end end |
#build_string ⇒ Object
12 13 14 |
# File 'lib/markio/builder.rb', line 12 def build_string build end |