require "trees/version"

module Trees

  class Node
    attr_accessor :value, :nodes
    def initialize (value, nodes = [])
      @value = Array(value)
      @nodes = Array(nodes)
    end
  end
end

require "trees/version"

module Trees

  class Node
    attr_reader :value, :nodes
    def initialize (value, nodes = [])
      @value = Array(value)
      @nodes = Array(nodes)
    end
  end
end

Change attr_accessor to attr_reader for encapsulation
Change attr_accessor to attr_reader for encapsulation
