Class: Bookery::Publishers::HTMLPublisher::TemplateObject
- Inherits:
-
Object
- Object
- Bookery::Publishers::HTMLPublisher::TemplateObject
- Defined in:
- lib/bookery/publishers/html_publisher.rb
Instance Attribute Summary collapse
-
#authors ⇒ Object
readonly
Returns the value of attribute authors.
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#editors ⇒ Object
readonly
Returns the value of attribute editors.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #get_binding ⇒ Object
-
#initialize(book) ⇒ TemplateObject
constructor
A new instance of TemplateObject.
Constructor Details
#initialize(book) ⇒ TemplateObject
Returns a new instance of TemplateObject.
54 55 56 57 58 59 60 |
# File 'lib/bookery/publishers/html_publisher.rb', line 54 def initialize(book) @title = book.title @authors = book..join(', ') @editors = book.editors.join(', ') @language = book.language @body = '<%= @body %>' end |
Instance Attribute Details
#authors ⇒ Object (readonly)
Returns the value of attribute authors.
53 54 55 |
# File 'lib/bookery/publishers/html_publisher.rb', line 53 def @authors end |
#body ⇒ Object (readonly)
Returns the value of attribute body.
53 54 55 |
# File 'lib/bookery/publishers/html_publisher.rb', line 53 def body @body end |
#editors ⇒ Object (readonly)
Returns the value of attribute editors.
53 54 55 |
# File 'lib/bookery/publishers/html_publisher.rb', line 53 def editors @editors end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
53 54 55 |
# File 'lib/bookery/publishers/html_publisher.rb', line 53 def language @language end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
53 54 55 |
# File 'lib/bookery/publishers/html_publisher.rb', line 53 def title @title end |
Instance Method Details
#get_binding ⇒ Object
62 63 64 |
# File 'lib/bookery/publishers/html_publisher.rb', line 62 def get_binding binding end |