Class: Blogdoor::Builder::Context
- Inherits:
-
Object
- Object
- Blogdoor::Builder::Context
- Defined in:
- lib/blogdoor/builder.rb
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Context
constructor
A new instance of Context.
- #to_binding ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ Context
Returns a new instance of Context.
50 51 52 53 54 |
# File 'lib/blogdoor/builder.rb', line 50 def initialize(args = {}) @title = args[:title] || "Preview" @created_at = (args[:created_at] || Time.now).strftime("%Y-%m-%d") @content = args[:content] || "" end |
Instance Method Details
#to_binding ⇒ Object
56 57 58 |
# File 'lib/blogdoor/builder.rb', line 56 def to_binding binding end |