Class: Peregrin::Component
- Defined in:
- lib/peregrin/component.rb
Overview
A component is a section of the book’s linear text.
Instance Attribute Summary collapse
-
#contents ⇒ Object
Returns the value of attribute contents.
Attributes inherited from Resource
#attributes, #media_type, #src
Instance Method Summary collapse
-
#initialize(src, contents = nil, media_type = nil, attributes = {}) ⇒ Component
constructor
A new instance of Component.
Constructor Details
#initialize(src, contents = nil, media_type = nil, attributes = {}) ⇒ Component
Returns a new instance of Component.
7 8 9 10 |
# File 'lib/peregrin/component.rb', line 7 def initialize(src, contents = nil, media_type = nil, attributes = {}) @contents = contents super(src, media_type, attributes) end |
Instance Attribute Details
#contents ⇒ Object
Returns the value of attribute contents.
5 6 7 |
# File 'lib/peregrin/component.rb', line 5 def contents @contents end |