class TreeStruct::Attributes

Public Class Methods

new(items = []) click to toggle source
# File lib/tree_struct/attributes.rb, line 3
def initialize(items = [])
  @items = items
end

Public Instance Methods

add(attribute) click to toggle source
# File lib/tree_struct/attributes.rb, line 7
def add(attribute)
  self.class.new(@items + [attribute])
end
map(*args, &block) click to toggle source
# File lib/tree_struct/attributes.rb, line 11
def map(*args, &block)
  @items.map(*args, &block)
end