Class: Vivlio::Starter::CLI::PreProcessCommands::CrossReferenceProcessor::Label

Inherits:
Struct
  • Object
show all
Defined in:
lib/vivlio/starter/cli/pre_process/cross_reference_processor.rb

Overview

ラベル定義情報を保持する構造体

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#autoObject

Returns the value of attribute auto

Returns:

  • (Object)

    the current value of auto



66
67
68
# File 'lib/vivlio/starter/cli/pre_process/cross_reference_processor.rb', line 66

def auto
  @auto
end

#chapterObject

Returns the value of attribute chapter

Returns:

  • (Object)

    the current value of chapter



66
67
68
# File 'lib/vivlio/starter/cli/pre_process/cross_reference_processor.rb', line 66

def chapter
  @chapter
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



66
67
68
# File 'lib/vivlio/starter/cli/pre_process/cross_reference_processor.rb', line 66

def id
  @id
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



66
67
68
# File 'lib/vivlio/starter/cli/pre_process/cross_reference_processor.rb', line 66

def line
  @line
end

#numberObject

Returns the value of attribute number

Returns:

  • (Object)

    the current value of number



66
67
68
# File 'lib/vivlio/starter/cli/pre_process/cross_reference_processor.rb', line 66

def number
  @number
end

#source_fileObject

Returns the value of attribute source_file

Returns:

  • (Object)

    the current value of source_file



66
67
68
# File 'lib/vivlio/starter/cli/pre_process/cross_reference_processor.rb', line 66

def source_file
  @source_file
end

#titleObject

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



66
67
68
# File 'lib/vivlio/starter/cli/pre_process/cross_reference_processor.rb', line 66

def title
  @title
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



66
67
68
# File 'lib/vivlio/starter/cli/pre_process/cross_reference_processor.rb', line 66

def type
  @type
end

Instance Method Details

#display_nameObject



67
68
69
# File 'lib/vivlio/starter/cli/pre_process/cross_reference_processor.rb', line 67

def display_name
  LABEL_TYPE_NAMES.fetch(type, '要素')
end

#full_numberObject



71
72
73
# File 'lib/vivlio/starter/cli/pre_process/cross_reference_processor.rb', line 71

def full_number
  "#{display_name} #{number}"
end