Class: RDoc::Markup::AttrChanger

Inherits:
Struct
  • Object
show all
Defined in:
lib/rdoc/markup/attr_changer.rb,
lib/rdoc/markup/attr_changer.rb

Overview

An AttrChanger records a change in attributes. It contains a bitmap of the attributes to turn on, and a bitmap of those to turn off.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#turn_offObject

Returns the value of attribute turn_off


3
4
5
# File 'lib/rdoc/markup/attr_changer.rb', line 3

def turn_off
  @turn_off
end

#turn_onObject

Returns the value of attribute turn_on


3
4
5
# File 'lib/rdoc/markup/attr_changer.rb', line 3

def turn_on
  @turn_on
end

Instance Method Details

#inspectObject

:nodoc:


17
18
19
# File 'lib/rdoc/markup/attr_changer.rb', line 17

def inspect # :nodoc:
  '+%d/-%d' % [turn_on, turn_off]
end

#to_sObject

:nodoc:


13
14
15
# File 'lib/rdoc/markup/attr_changer.rb', line 13

def to_s # :nodoc:
  "Attr: +#{turn_on}/-#{turn_off}"
end