class Rouge::InheritableList

Public Class Methods

new(parent=nil) click to toggle source
# File lib/rouge/util.rb, line 41
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 49
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 56
def own_entries
  @own_entries ||= []
end
parent() click to toggle source
# File lib/rouge/util.rb, line 45
def parent
  @parent ||= []
end
push(o) click to toggle source
# File lib/rouge/util.rb, line 60
def push(o)
  own_entries << o
end
Also aliased as: <<