Class: Bookery::Publishers::HTMLPublisher::TemplateObject

Inherits:
Object
  • Object
show all
Defined in:
lib/bookery/publishers/html_publisher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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.authors.join(', ')
  @editors = book.editors.join(', ')
  @language = book.language
  @body = '<%= @body %>'
end

Instance Attribute Details

#authorsObject (readonly)

Returns the value of attribute authors.



53
54
55
# File 'lib/bookery/publishers/html_publisher.rb', line 53

def authors
  @authors
end

#bodyObject (readonly)

Returns the value of attribute body.



53
54
55
# File 'lib/bookery/publishers/html_publisher.rb', line 53

def body
  @body
end

#editorsObject (readonly)

Returns the value of attribute editors.



53
54
55
# File 'lib/bookery/publishers/html_publisher.rb', line 53

def editors
  @editors
end

#languageObject (readonly)

Returns the value of attribute language.



53
54
55
# File 'lib/bookery/publishers/html_publisher.rb', line 53

def language
  @language
end

#titleObject (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_bindingObject



62
63
64
# File 'lib/bookery/publishers/html_publisher.rb', line 62

def get_binding
  binding
end