Class: Manual

Inherits:
ArchDefObject show all
Defined in:
lib/arch_obj_models/manual.rb

Instance Method Summary collapse

Constructor Details

#initialize(data, arch_def) ⇒ Manual

Returns a new instance of Manual.



8
9
10
11
# File 'lib/arch_obj_models/manual.rb', line 8

def initialize(data, arch_def)
  super(data)
  @arch_def = arch_def
end

Instance Method Details

#marketing_nameString

Returns The title of the manual, as used by marketing.

Returns:

  • (String)

    The title of the manual, as used by marketing



29
# File 'lib/arch_obj_models/manual.rb', line 29

def marketing_name = @data["marketing_name"]

#version(name) ⇒ Object



24
25
26
# File 'lib/arch_obj_models/manual.rb', line 24

def version(name)
  versions.find { |v| v.name == name }
end

#versionsObject



13
14
15
16
17
18
19
20
21
22
# File 'lib/arch_obj_models/manual.rb', line 13

def versions
  return @versions unless @versions.nil?

  @versions = []
  @data["versions"].each do |version|
    @versions << ManualVersion.new(version, self, @arch_def)
  end

  @versions
end