This question is worth more attention
Pex is plumbing pipe NOT pressure hose. No.
Most EmphaticallyNO! PEX can not be used for Gas piping because it can and will eventually breakdown and begin to leak. Copper is only recommended for short visible runs that can be readily inspected. Black Galvanized Gas piping is the only way to go for any installs through wall penetrations, stud through or in the the wall installs. Flexible gas line must only be used in installs where the pipe is buried or transferring gas over longer distances. Again, DO NOT USE!!! PEX for any kind of flammable gas supplies.
Black iron pipe or copper tubing. There are some other products that are acceptable, but Pex certainly isn't one of them! The piping also has to be sized correctly to ensure enough supply for the appliance. If it is too small the installation will not perform correctly or safely. EDIT: Galvinized pipe is NOT acceptable for gas service.Copper tubing IS acceptable to run through wall penetrations and CAN be concealed. If you are running through concrete however the gas line must be wrapped to protect it from being corroded by the lime in the concrete. This is true for black iron or copper.