Class: Peregrin::Component

Inherits:
Resource show all
Defined in:
lib/peregrin/component.rb

Overview

A component is a section of the book's linear text.

Instance Attribute Summary (collapse)

Attributes inherited from Resource

#attributes, #media_type, #src

Instance Method Summary (collapse)

Constructor Details

- (Component) initialize(src, contents = nil, media_type = nil, attributes = {})

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

- (Object) contents

Returns the value of attribute contents



5
6
7
# File 'lib/peregrin/component.rb', line 5

def contents
  @contents
end