Class: EPUB::Publication::Package::Guide

Inherits:
Object
  • Object
show all
Includes:
Inspector::PublicationModel
Defined in:
lib/epub/publication/package/guide.rb

Defined Under Namespace

Classes: Reference

Constant Summary

Constants included from Inspector::PublicationModel

Inspector::PublicationModel::TEMPLATE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Inspector::PublicationModel

included, #inspect

Constructor Details

#initializeGuide

Returns a new instance of Guide.


8
9
10
11
12
13
14
# File 'lib/epub/publication/package/guide.rb', line 8

def initialize
  Reference::TYPES.each do |type|
    variable_name = '@' + type.gsub('-', '_')
    instance_variable_set variable_name, nil
  end
  @references = []
end

Instance Attribute Details

#packageObject

Returns the value of attribute package


6
7
8
# File 'lib/epub/publication/package/guide.rb', line 6

def package
  @package
end

#referencesObject

Returns the value of attribute references


6
7
8
# File 'lib/epub/publication/package/guide.rb', line 6

def references
  @references
end

Instance Method Details

#<<(reference) ⇒ Object


16
17
18
19
# File 'lib/epub/publication/package/guide.rb', line 16

def <<(reference)
  reference.guide = self
  references << reference
end