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

Returns:

  • (Object)

    the current value of turn_off



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

def turn_off
  @turn_off
end

#turn_onObject

Returns the value of attribute turn_on

Returns:

  • (Object)

    the current value of turn_on



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

def turn_on
  @turn_on
end

Instance Method Details

#inspectObject

:nodoc:



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

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

#to_sObject

:nodoc:



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

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