Class: ERBook::Document::Node

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/erbook/document.rb

Instance Method Summary collapse

Instance Method Details

#chain?Boolean

Include this node in the previous/next navigation chain?

Returns:

  • (Boolean)


88
89
90
# File 'lib/erbook/document.rb', line 88

def chain?
  definition['chain']
end

#inline?Boolean

Returns:

  • (Boolean)


92
93
94
# File 'lib/erbook/document.rb', line 92

def inline?
  definition['inline']
end

#ordinal_number?Boolean

Returns:

  • (Boolean)


81
82
83
# File 'lib/erbook/document.rb', line 81

def ordinal_number?
  Array(definition['number']).include? 'ordinal'
end

#section_number?Boolean

Returns:

  • (Boolean)


77
78
79
# File 'lib/erbook/document.rb', line 77

def section_number?
  Array(definition['number']).include? 'section'
end

#silent?Boolean

Returns:

  • (Boolean)


96
97
98
# File 'lib/erbook/document.rb', line 96

def silent?
  definition['silent']
end

#to_sObject

Returns the output of this node.



69
70
71
72
73
74
75
# File 'lib/erbook/document.rb', line 69

def to_s
  if silent?
    ''
  else
    output
  end
end