class RDoc::Attr
def <=>(other)
def <=>(other) self.name <=> other.name end
def == other
def == other self.class == other.class and self.name == other.name and self.rw == other.rw end
def arglists
def arglists end
def block_params
def block_params end
def call_seq
def call_seq end
def full_name
def full_name @full_name ||= "#{@parent ? @parent.full_name : '(unknown)'}##{name}" end
def html_name
def html_name @name.gsub(/[^a-z]+/, '-') end
def initialize(text, name, rw, comment)
def initialize(text, name, rw, comment) super() @text = text @name = name @rw = rw @visibility = :public self.comment = comment end
def inspect # :nodoc:
def inspect # :nodoc: attr = case rw when 'RW' then :attr_accessor when 'R' then :attr_reader when 'W' then :attr_writer else " (#{rw})" end "#<%s:0x%x %s.%s :%s>" % [ self.class, object_id, parent_name, attr, @name, ] end
def marshal_dump
def marshal_dump [ MARSHAL_VERSION, @name, full_name, @rw, @visibility, parse(@comment), ] end
def marshal_load array
def marshal_load array @name = array[1] @full_name = array[2] @rw = array[3] @visibility = array[4] @comment = array[5] @parent_name = @full_name end
def params
def params nil end
def parent_name
def parent_name @parent_name || super end
def path
def path "#{@parent.path}##{@name}" end
def singleton
def singleton false end
def to_s # :nodoc:
def to_s # :nodoc: "#{type} #{name}\n#{comment}" end
def type
def type case @rw when 'RW' then 'attr_accessor' when 'R' then 'attr_reader' when 'W' then 'attr_writer' end end