class Rugments::InheritableList

Public Class Methods

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

Public Instance Methods

<<(o)
Alias for: push
each(&b) click to toggle source
# File lib/rugments/util.rb, line 47
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/rugments/util.rb, line 54
def own_entries
  @own_entries ||= []
end
parent() click to toggle source
# File lib/rugments/util.rb, line 43
def parent
  @parent ||= []
end
push(o) click to toggle source
# File lib/rugments/util.rb, line 58
def push(o)
  own_entries << o
end
Also aliased as: <<