How to dynamically set pinMode and dynamically write value to pins in Arduino using arrays?
It seems in the LeftToRight method, you didn't comment out enough (or too much), because  you use a for loop inside another for loop which is probably unintended.

In the RightToLeft' method I will try to fix the problem, so you can change theLeftToRight` method similarly.

void LED :: RightToLeft(int numberofLEDs,int delay_ms)
{
  for(int i =_channel ;i&gt;0; i--)
  {
    digitalWrite(_pins[i], LOW);
  }
  for(int i = _channel ;i&gt;0; i--)
  {
    if (i &lt; _channel)
    {
     digitalWrite(_pins[i+1], LOW);
    }
    digitalWrite(_pins[i], HIGH);
    delay(delay_ms);
  }
}


The first for loop is to switch off the LEDs, I would make this a separate method, so it can be reused in both the LeftToRight and RightToLeft method, so you get:

void LED::RightToLeft(int numberofLEDs, int delay_ms)
{
  switchAllLedsOff();

  for(int i = _channel; i &gt; 0; i--)
  {
    if (i &lt; _channel)
    {
     digitalWrite(_pins[i + 1], LOW);
    }
    digitalWrite(_pins[i], HIGH);
    delay(delay_ms);
  }
}

void LED::SwitchAllLedsOff()
{
  for(int i = _channel; i &gt; 0; i--)
  {
    digitalWrite(_pins[i], LOW);
  }
}


The problem is also, that you always write HIGH to a pin, since it overwrite the possible LOW assignment within the if statement. To correct this you get:

void LED::RightToLeft(int numberofLEDs, int delay_ms)
{
  switchAllLedsOff();

  for(int i = _channel; i &gt; 0; i--)
  {
    digitalWrite(_pins[i + 1], i &gt;= _channel ? HIGH : LOW);
    delay(delay_ms);
  }
}


You also can use an if statement, but in this case the ternary (? :)  statement is more clear since the assignment is for a single destination (_pins[i + 1]). So in case i >= channel, it is set to HIGH, otherwise set to FALSE. I also inverted the operator, but you can keep it inverted too.

Third, _channel seems to be the number of elements in the array, if you use it in an index it should start with _channel - 1, so you get:

void LED::RightToLeft(int numberofLEDs, int delay_ms)
{
  switchAllLedsOff();

  for(int i = _channel - 1; i &gt;= 0; i--)
  {
    digitalWrite(_pins[i + 1], i &gt;= _channel - 1 ? HIGH : LOW);
    delay(delay_ms);
  }
}


There might be more problems, but the above are at lest some of them.

Also I changed your way of using spaces, although it's a matter of personal style, yours I never saw before (which doesn't mean it's incorrect of course).

(note I have not tested the program).