class Rouge::InheritableList

Public Class Methods

new(parent=nil) click to toggle source
# File lib/rouge/util.rb, line 40
def initialize(parent=nil)
  @parent = parent
end

Public Instance Methods

<<(o)
Alias for: push
each(&b) click to toggle source
# File lib/rouge/util.rb, line 48
def each(&b)
  return enum_for(:each) unless block_given?

  parent.each(&b)
  own_entries.each(&b)
end
own_entries() click to toggle source
# File lib/rouge/util.rb, line 55
def own_entries
  @own_entries ||= []
end
parent() click to toggle source
# File lib/rouge/util.rb, line 44
def parent
  @parent ||= []
end
push(o) click to toggle source
# File lib/rouge/util.rb, line 59
def push(o)
  own_entries << o
end
Also aliased as: <<